diff --git a/evennia/accounts/accounts.py b/evennia/accounts/accounts.py index 96f5400ce6..5bb704cdde 100644 --- a/evennia/accounts/accounts.py +++ b/evennia/accounts/accounts.py @@ -184,7 +184,7 @@ class DefaultAccount(AccountDB, metaclass=TypeclassBase): - at_server_reload() - at_server_shutdown() - """ + """ objects = AccountManager() @@ -680,6 +680,9 @@ class DefaultAccount(AccountDB, metaclass=TypeclassBase): ) Character = class_from_module(character_typeclass) + if "location" not in kwargs: + kwargs["location"] = ObjectDB.objects.get_id(settings.START_LOCATION) + # Create the character character, errs = Character.create( character_key, diff --git a/evennia/utils/tests/test_gametime.py b/evennia/utils/tests/test_gametime.py index 28291d01a7..9060546cbf 100644 --- a/evennia/utils/tests/test_gametime.py +++ b/evennia/utils/tests/test_gametime.py @@ -2,6 +2,7 @@ Unit tests for the utilities of the evennia.utils.gametime module. """ +from datetime import datetime import time import unittest from unittest.mock import Mock @@ -16,7 +17,7 @@ class TestGametime(TestCase): def setUp(self) -> None: self.time = time.time self._SERVER_EPOCH = gametime._SERVER_EPOCH - time.time = Mock(return_value=1555595378.0) + time.time = Mock(return_value=datetime(2019, 4, 18, 13, 49, 38).timestamp()) gametime._SERVER_EPOCH = None gametime.SERVER_RUNTIME = 600.0 gametime.SERVER_START_TIME = time.time() - 300 @@ -54,7 +55,9 @@ class TestGametime(TestCase): self.assertAlmostEqual(gametime.gametime(), 630.0 * 5) def test_gametime_absolute(self): - self.assertAlmostEqual(gametime.gametime(absolute=True), 1555597898.0) + self.assertAlmostEqual( + gametime.gametime(absolute=True), datetime(2019, 4, 18, 14, 31, 38).timestamp() + ) def test_gametime_downtimes(self): gametime.IGNORE_DOWNTIMES = True