def test_attack(self): hero = Hero() beast = Beast() hero.strength = 80 beast.luck = 0 initial_health = beast.health attack(hero, beast) self.assertNotEqual(initial_health, beast.health)
def test_dmg_to_be_done(self): hero = Hero() beast = Beast() hero.strength = 80 initial_dmg = hero.damage_to_be_done beast.luck = 0 attack(hero, beast) self.assertNotEqual(initial_dmg, hero.damage_to_be_done)
def test_damage_done(self): hero = Hero() beast = Beast() # as much as the beast has defence hero.strength = 40 initial_health = beast.health attack(hero, beast) self.assertEqual(initial_health, beast.health)