Пример #1
0
 def test_load_by_season(self):
     fights = Fight.load_by_season(season=9)
     assert isinstance(fights, dict)
     assert len(fights) > 0
     for key, fight in fights.items():
         assert isinstance(key, str)
         assert isinstance(fight, Fight)
         assert key == fight.id
Пример #2
0
 def __init__(self, data, parent):
     self._parent = parent
     self.boss_fights = {
         g['id']: Fight(g)
         for g in data.get('bossFights', [])
     }
Пример #3
0
 def fight_hallstars_vs_pods(self):
     """S10, Final damage on PODs"""
     return Fight.load_by_id("9bb560d9-4925-4845-ad03-26012742ee23")
Пример #4
0
 def fight_crabs_vs_pods(self):
     """common case"""
     return Fight.load_by_id("6754f45d-52a6-4b2f-b63c-15dcd520f8cf")
Пример #5
0
 def fight_shoethieves_vs_pods(self):
     """S9 example"""
     return Fight.load_by_id("3e2882a7-1553-49bd-b271-49cab930d9fc")
Пример #6
0
 def test_load_by_season_bad_season_invalid(self):
     bad_season = Fight.load_by_season(3)
     assert isinstance(bad_season, dict)
     assert len(bad_season) == 0
Пример #7
0
 def test_load_by_id_bad_id(self):
     bad_id = Fight.load_by_id("00000000-0000-0000-0000-000000000000")
     assert bad_id is None
Пример #8
0
 def test_load_by_id(self):
     fight = Fight.load_by_id("6754f45d-52a6-4b2f-b63c-15dcd520f8cf")
     assert isinstance(fight, Fight)