def test_when_hero_has_same_attack_points_as_enemy_armor_points(self):
        dungeon = Dungeon('level1.txt')
        hero = Hero(name="Bron",
                    title="Dragonslayer",
                    health=100,
                    mana=100,
                    mana_regeneration_rate=2)
        dungeon.spawn(hero)
        hero.equip(Weapon('Axe', 20))
        hero.equip(Armor('Shield', 20))

        enemy = Enemy(50, 50, 20)
        enemy.equip(Armor('Vest', 20))

        result = dungeon._fight(enemy)

        self.assertTrue('Hero got tired and let his guard down.' in result)
    def test_when_hero_attacks_and_enemy_has_armor_with_lower_armor_points(
            self):
        dungeon = Dungeon('level1.txt')
        hero = Hero(name="Bron",
                    title="Dragonslayer",
                    health=100,
                    mana=100,
                    mana_regeneration_rate=2)
        hero.equip(Weapon('Axe', 20))

        enemy = Enemy(50, 50, 20)
        enemy.equip(Armor('Vest', 10))

        expected_damage_taken = 10

        result_damage_taken = dungeon.attack(hero, enemy)[0]

        self.assertEqual(result_damage_taken, expected_damage_taken)