Ejemplo n.º 1
0
 def test_meet_enemy_when_loose_fight(self, mock_defeat_enemy):
     mock_defeat_enemy.return_value = False
     my_hero = Hero(room=Room(enemy=Enemy(kill_by=Obj.GUN)))
     my_hero.meet_enemy()
     self.assertFalse(my_hero.is_alive)
     self.assertIsNotNone(my_hero.current_room.enemy)
Ejemplo n.º 2
0
 def test_meet_enemy_when_no_enemy(self):
     my_hero = Hero(room=Room(enemy=None))
     self.assertIsNone(my_hero.meet_enemy())