Test clicking on the merchant pad

This commit is contained in:
Yohann D'ANELLO
2020-12-11 18:44:05 +01:00
parent 53d090a9c8
commit a4a10e340d
2 changed files with 3 additions and 2 deletions

View File

@ -539,9 +539,10 @@ class TestGame(unittest.TestCase):
# The second item is not a heart
merchant.inventory[1] = Sword()
# Buy the second item
# Buy the second item by clicking on it
item = self.game.store_menu.validate()
self.assertIn(item, merchant.inventory)
self.game.display_actions(DisplayActions.MOUSE, 8, 25)
self.game.handle_key_pressed(KeyValues.ENTER)
self.assertIn(item, self.game.player.inventory)
self.assertNotIn(item, merchant.inventory)