class TestPlayerGenerator(unittest.TestCase): def setUp(self): self.level = Level(Profile(), 15) self.previous_level = Level(Profile(), 14) self.generator = PlayerGenerator(self.level, self.previous_level) def test_should_know_templates_path(self): expected = os.path.normpath( os.path.dirname(__file__) + '/../templates'), self.assertEqual(self.generator.templates_path(), expected[0])
class TestPlayerGenerator(unittest.TestCase): def setUp(self): self.level = Level(Profile(), 15) self.previous_level = Level(Profile(), 14) self.generator = PlayerGenerator(self.level, self.previous_level) def test_should_know_templates_path(self): expected = os.path.normpath(os.path.dirname(__file__) + '/../templates'), self.assertEqual(self.generator.templates_path(), expected[0])
def setUp(self): self.level = Level(Profile(), 15) self.previous_level = Level(Profile(), 14) self.generator = PlayerGenerator(self.level, self.previous_level)
def generate_player_files(self): self.load_level() PlayerGenerator(self, Level(self.profile, self.number - 1)).generate()
def prepare_next_level(self): self.next_level().load_level() PlayerGenerator(self.next_level(), self.current_level()).generate() self.profile().level_number += 1 self.profile().save()