update and fix chargen contrib test

This commit is contained in:
InspectorCaracal 2022-11-20 19:30:21 -07:00
parent 86318b7559
commit dee79edcbb

View file

@ -9,24 +9,28 @@ from . import character_creator
class TestAccount(BaseEvenniaCommandTest):
def setUp(self):
super().setUp()
self.account.swap_typeclass(character_creator.ContribChargenAccount)
def test_ooc_look(self):
if settings.MULTISESSION_MODE < 2:
self.call(
account.CmdOOCLook(), "", "You are out-of-character (OOC).", caller=self.account
)
if settings.MULTISESSION_MODE == 2:
# test both normal output and also inclusion of in-progress character
self.account.db._playable_characters = [self.char1]
self.char1.db.chargen_step = "start"
self.account.db._playable_characters = [self.char1]
self.account.unpuppet_all()
self.char1.db.chargen_step = "start"
with patch("evennia.commands.default.account._AUTO_PUPPET_ON_LOGIN", new=False):
# check that correct output is returning
output = self.call(
account.CmdOOCLook(),
"",
"Account TestAccount (you are Out-of-Character)",
caller=self.account,
)
self.assertIn("|Yin progress|n", output)
# check that char1 is recognized as in progress
self.assertIn("in progress", output)
@override_settings(CHARGEN_MENU="evennia.contrib.base_systems.character_creator.example_menu")
@override_settings(CHARGEN_MENU="evennia.contrib.rpg.character_creator.example_menu")
def test_char_create(self):
self.call(
character_creator.ContribCmdCharCreate(),