def process_nightfall(activity_map): """ :param activity_map: A dictionary of processed event information :return dictionary: A dictionary of the Nightfall's information """ nightfall_info = activity_map['nightfall'] description = nightfall_info['activityDescription'] skulls = nightfall_info['skulls'] mods = [s['displayName'] for s in skulls] title = nightfall_info['activityName'] name = get_short_name(description) nf_dict = {'title': title, 'description': description, 'mods': stringify_mods(mods), 'name': name, } return nf_dict
def process_heroic(activity_map): """ :param activity_map: A dictionary of processed event information :return dictionary: A dictionary of the Heroic's information """ heroic_acts = activity_map['heroic'] # Here, we'll just use the first instance's information # since the only variation should be the levels. heroic_info = heroic_acts[0] description = heroic_info['activityDescription'] skulls = heroic_info['skulls'] mods = [s['displayName'] for s in skulls] title = heroic_info['activityName'] name = get_short_name(description) heroic_dict = {'title': title, 'description': description, 'mods': stringify_mods(mods), 'name': name, } return heroic_dict
def test_predator(): with pytest.raises(strike.UnknownStrikeError): strike.get_short_name(PREDATOR)
def test_undying_mind(): assert strike.UNDYING_MIND.name == strike.get_short_name(UNDYING_MIND)
def test_dust_palace(): assert strike.DUST_PALACE.name == strike.get_short_name(DUST_PALACE)
def test_cerberus_vae_iii(): assert strike.CERBERUS_VAE_III.name == strike.get_short_name( CERBERUS_VAE_III)
def test_winters_run(): assert strike.WINTERS_RUN.name == strike.get_short_name(WINTERS_RUN)
def test_nexus(): assert strike.NEXUS.name == strike.get_short_name(NEXUS)
def test_summoning_pits(): assert strike.SUMMONING_PITS.name == strike.get_short_name(SUMMONING_PITS)
def test_will_of_crota(): assert strike.WILL_OF_CROTA.name == strike.get_short_name(WILL_OF_CROTA)
def test_devils_lair(): assert strike.DEVILS_LAIR.name == strike.get_short_name(DEVILS_LAIR)