def test_build(self): conn = PlayerConnection() with WrappedConsoleIO(conn) as io: conn.io = io b = CharacterBuilder(conn, None) builder = b.build_async() why, what = next(builder) self.assertEqual("input", why)
def test_apply_to(self): b = CharacterBuilder(None) p = Player("test", "n") pn = b.create_default_wizard() self.assertFalse("wizard" in p.privileges) self.assertEqual("Test", p.title) pn.apply_to(p) self.assertTrue("wizard" in p.privileges) self.assertEqual("rinzwind", p.name) self.assertEqual("human", p.race) self.assertEqual("m", p.gender) self.assertEqual("arch wizard Rinzwind", p.title)
def test_build(self): b = CharacterBuilder(None) pn = b.create_default_player() self.assertFalse(pn.wizard) pn = b.create_default_wizard() self.assertTrue(pn.wizard)