コード例 #1
0
ファイル: tests.py プロジェクト: quantum13/hgh
 def test_hero_stats(self):
     """
     tests correct getting stats of hero
     """
     hero = Hero(
         attack_github = 2,
         attack_own = 3
     )
     assert hero.get_attack() == 5
コード例 #2
0
ファイル: tests.py プロジェクト: quantum13/hgh
    def test_hero_update_race(self):
        """tests setting race based on race of units"""
        hero = Hero(user=self.user)
        hero.save()
        Unit(hero=hero,race='human').save()
        Unit(hero=hero,race='elf').save()
        Unit(hero=hero,race='elf').save()

        hero.update_race()


        assert hero.race == 'elf'