def test_can_cast_with_not_enough_mana_raises_error(self): entity = Entity(health=100, mana=30) spell = Spell(name="Fireball", damage=30, mana_cost=50, cast_range=2) entity.learn(spell) with self.assertRaises(LogicError): entity.can_cast()
def test_can_cast_with_no_spell_returns_false(self): entity = Entity(health=100, mana=50) self.assertFalse(entity.can_cast())