In load&save test, force to have a merchant
This commit is contained in:
parent
39787861dc
commit
cea015d015
|
@ -7,7 +7,7 @@ import unittest
|
|||
from ..bootstrap import Bootstrap
|
||||
from ..display.display import Display
|
||||
from ..display.display_manager import DisplayManager
|
||||
from ..entities.friendly import Sunflower
|
||||
from ..entities.friendly import Sunflower, Merchant
|
||||
from ..entities.items import Bomb
|
||||
from ..entities.player import Player
|
||||
from ..enums import DisplayActions
|
||||
|
@ -35,7 +35,14 @@ class TestGame(unittest.TestCase):
|
|||
"""
|
||||
bomb = Bomb()
|
||||
self.game.map.add_entity(bomb)
|
||||
# Add an item in the inventory to check that it is well loaded
|
||||
bomb.hold(self.game.player)
|
||||
|
||||
# Ensure that merchants can be saved
|
||||
merchant = Merchant()
|
||||
merchant.move(3, 6)
|
||||
self.game.map.add_entity(merchant)
|
||||
|
||||
old_state = self.game.save_state()
|
||||
|
||||
self.game.handle_key_pressed(KeyValues.DOWN)
|
||||
|
|
Loading…
Reference in New Issue