diff --git a/dungeonbattle/tests/game_test.py b/dungeonbattle/tests/game_test.py index 2c327dc..c9bd8bb 100644 --- a/dungeonbattle/tests/game_test.py +++ b/dungeonbattle/tests/game_test.py @@ -172,6 +172,30 @@ class TestGame(unittest.TestCase): self.assertFalse(self.game.settings_menu.waiting_for_key) self.assertEqual(self.game.settings.KEY_LEFT_PRIMARY, 'a') + # Navigate to "texture pack" + self.game.handle_key_pressed(KeyValues.DOWN) + self.game.handle_key_pressed(KeyValues.DOWN) + self.game.handle_key_pressed(KeyValues.DOWN) + self.game.handle_key_pressed(KeyValues.DOWN) + self.game.handle_key_pressed(KeyValues.DOWN) + + # Change texture pack + self.assertEqual(self.game.settings.TEXTURE_PACK, "ascii") + self.game.handle_key_pressed(KeyValues.ENTER) + self.assertEqual(self.game.settings.TEXTURE_PACK, "squirrel") + self.game.handle_key_pressed(KeyValues.ENTER) + self.assertEqual(self.game.settings.TEXTURE_PACK, "ascii") + + # Navigate to "back" button + self.game.handle_key_pressed(KeyValues.DOWN) + self.game.handle_key_pressed(KeyValues.DOWN) + self.game.handle_key_pressed(KeyValues.DOWN) + self.game.handle_key_pressed(KeyValues.DOWN) + self.game.handle_key_pressed(KeyValues.DOWN) + + self.game.handle_key_pressed(KeyValues.ENTER) + self.assertEqual(self.game.state, GameMode.MAINMENU) + def test_dead_screen(self) -> None: """ Kill player and render dead screen.