def test_score_v4(self): """Test method ``score``. Use a ``CharacterSpell`` having 3.0 points. """ char_spell = factories.CharacterSpellFactory(points=3) self.assertEqual(char_spell.score(), char_spell._base_score() + 2) # pylint: disable=W0212
def test_score_v1(self): """Test method ``score``. Use a ``CharacterSpell`` having 0.0 points. """ char_spell = factories.CharacterSpellFactory(points=0) self.assertEqual(char_spell.score(), 0)
def test_score_v6(self): """Test method ``score``. Use a ``CharacterSpell`` having 5.0 points and a 'Very Hard' ``Spell``. """ spell = factories.SpellFactory( difficulty=models.Spell.get_difficulty_id('Very Hard')) char_spell = factories.CharacterSpellFactory(points=5, spell=spell) self.assertEqual( char_spell.score(), char_spell._base_score() + (char_spell.points // 4) + 2 # pylint: disable=W0212 )