mirror of
https://github.com/evennia/evennia.git
synced 2026-04-02 05:57:16 +02:00
Fix two bugs in unittest (one Windows-specific)
This commit is contained in:
parent
8cdc641ffc
commit
0bde212ce2
2 changed files with 4 additions and 1 deletions
|
|
@ -542,8 +542,11 @@ class TestInterruptCommand(CommandTest):
|
|||
|
||||
class TestUnconnectedCommand(CommandTest):
|
||||
def test_info_command(self):
|
||||
# instead of using SERVER_START_TIME (0), we use 86400 because Windows won't let us use anything lower
|
||||
gametime.SERVER_START_TIME = 86400
|
||||
expected = "## BEGIN INFO 1.1\nName: %s\nUptime: %s\nConnected: %d\nVersion: Evennia %s\n## END INFO" % (
|
||||
settings.SERVERNAME,
|
||||
datetime.datetime.fromtimestamp(gametime.SERVER_START_TIME).ctime(),
|
||||
SESSIONS.account_count(), utils.get_evennia_version())
|
||||
self.call(unloggedin.CmdUnconnectedInfo(), "", expected)
|
||||
del gametime.SERVER_START_TIME
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ class TestLanguage(EvenniaTest):
|
|||
word_length_variance=4)
|
||||
|
||||
def test_available_languages(self):
|
||||
self.assertEqual(rplanguage.available_languages(), ["binary", "testlang"])
|
||||
self.assertEqual(list(sorted(rplanguage.available_languages())), ["binary", "testlang"])
|
||||
|
||||
def test_obfuscate_whisper(self):
|
||||
self.assertEqual(rplanguage.obfuscate_whisper(text, level=0.0), text)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue