def setup(): """Initialize a basic game structure with the local levels installed""" levels = Loader.local_levels() story = Story() for level in levels: story.add_level(level) add_url( "actions/<level_identifier>/<action_identifier>", generate_resolve_action_view(story), )
def test_local_levels_is_checking_current_class_inheritance(self): with self.assertRaises(InvalidCurrentClass): list(Loader.local_levels())
def test_local_levels_is_checking_missing_current_class(self): with self.assertRaises(MissingCurrentClass): list(Loader.local_levels())
def test_local_levels_is_checking_duplicated_ids(self): with self.assertRaises(DuplicatedLevelIdentifier): list(Loader.local_levels())
def test_local_levels_is_checking_manifest(self): with self.assertRaises(InvalidManifestStructure): list(Loader.local_levels())
def test_local_levels_missing_required_files(self): with self.assertRaises(InvalidLevelStructure): list(Loader.local_levels())
def test_local_levels_ok(self): local_levels = list(Loader.local_levels()) self.assertEqual(len(local_levels), 1)