def from_dict(cls, json_dict: Dict) -> SMSEvent: return NotifySingleTribeCouncilEvent( game_id=json_dict['game_id'], game_options=json_dict['game_options'], winning_teams=[Team.from_dict(v) for v in json_dict['winning_teams']], losing_teams=[Team.from_dict(v) for v in json_dict['losing_teams']] )
def from_dict(cls, json_dict: Dict) -> SMSEvent: return NotifyTeamReassignmentEvent( game_id=json_dict['game_id'], game_options=json_dict['game_options'], player=Player.from_dict(json_dict['player']), team=Team.from_dict(json_dict['team']) )
phone_number='sms/bar', tribe_id='tribe/foo', team_id='team/bar', active=True) _TEST_CHALLENGE = Challenge(id='foo', name='bar') _TEST_ENTRY = Entry( id='id/foo', likes=100, views=1000, player_id='player/foo', tribe_id='tribe/bar', challenge_id='challenge/foo', team_id='team/bar', url='https://www.tiktok.com/@ifrc/video/6816427450801736965') _TEST_TEAM1 = Team(id='id/foo1', name='team/bar', count_players=5, tribe_id='tribe/foo') _TEST_TEAM2 = Team(id='id/foo2', name='team/bar', count_players=5, tribe_id='tribe/foo') _TEST_TRIBE1 = Tribe(id='id/foo1', name='SIDAMA', count_players=1e6) _TEST_TRIBE2 = Tribe(id='id/foo2', name='TIGRAWAY', count_players=500e3) _TEST_GAME_OPTIONS = GameOptions(game_schedule=STV_I18N_TABLE['US']) _gamedb = FirestoreDB(json_config_path=_TEST_FIRESTORE_INSTANCE_JSON_PATH, game_id=_TEST_GAME_ID) _TEST_EVENTS = [ events.NotifyTribalChallengeEvent(game_id=_TEST_GAME_ID, game_options=_TEST_GAME_OPTIONS,
def from_dict(cls, json_dict: Dict) -> SMSEvent: return NotifyImmunityAwardedEvent( game_id=json_dict['game_id'], game_options=json_dict['game_options'], team=Team.from_dict(json_dict['team']))
email='email/foo', phone_number='sms/bar', tribe_id='tribe/foo', team_id='team/bar', active=True) _TEST_CHALLENGE = Challenge(id='foo', name='bar') _TEST_ENTRY = Entry( id='id/foo', likes=100, views=1000, player_id='player/foo', tribe_id='tribe/bar', challenge_id='challenge/foo', team_id='team/bar', url='https://www.tiktok.com/@ifrc/video/6816427450801736965') _TEST_TEAM1 = Team(id='id/foo1', name='team/bar', size=5, tribe_id='tribe/foo') _TEST_TEAM2 = Team(id='id/foo2', name='team/bar', size=5, tribe_id='tribe/foo') _TEST_TRIBE1 = Tribe(id='id/foo1', name='SIDAMA', size=1e6) _TEST_TRIBE2 = Tribe(id='id/foo2', name='TIGRAWAY', size=500e3) _TEST_GAME_OPTIONS = GameOptions(game_schedule=STV_I18N_TABLE['US']) _gamedb = FirestoreDB(json_config_path=_TEST_FIRESTORE_INSTANCE_JSON_PATH, game_id=_TEST_GAME_ID) _TEST_EVENTS = [ events.NotifyTribalChallengeEvent(game_id=_TEST_GAME_ID, game_options=_TEST_GAME_OPTIONS, challenge=_TEST_CHALLENGE), events.NotifyPlayerScoreEvent(game_id=_TEST_GAME_ID, game_options=_TEST_GAME_OPTIONS, player=_TEST_PLAYER1,