Fix two bugs in unittest (one Windows-specific)

This commit is contained in:
Vincent Le Goff 2018-10-14 11:44:35 +02:00
parent 8cdc641ffc
commit 0bde212ce2
2 changed files with 4 additions and 1 deletions

View file

@ -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

View file

@ -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)