Example #1
0
    def test_single_weapon_requirement(self):
        ''' even if there's only one requirement, it should be returned as a list
        of one element '''

        skill_name_and_url = ('Naga', '/Naga_(tome)')
        weapon_dict = weapon_scraper(skill_name_and_url)
        assert (weapon_dict['Required'] == ['Rexcalibur'])
Example #2
0
    def test_list_of_owners(self):
        ''' weapon scraper should retrieve weapon owners and at what rarity skill is learned
        as a tuple (name, rarity) '''

        skill_name_and_url = ('Naga', '/Naga_(tome)')
        weapon_dict = weapon_scraper(skill_name_and_url)
        assert (weapon_dict['List of Owners'] == [("Julia: Naga's Blood", '5')])
Example #3
0
    def test_weapon_upgrades(self):
        ''' weapon scraper should retrieve weapon upgrades if it exists '''

        skill_name_and_url = ('Naga', '/Naga_(tome)')
        weapon_dict = weapon_scraper(skill_name_and_url)
        assert (weapon_dict['Upgrades'] == [['https://gamepedia.cursecdn.com/feheroes_gamepedia_en/thumb/8/83/Naga_tome_W.png/24px-Naga_tome_W.png?version=781176fd1d1f5d7ae3b7d1c7a4fdebf6', '—', 'Effective against dragon foes. If foe initiates combat, grants Def/Res+4 during combat.In combat against a dragon foe, disables foe\'s skills that "calculate damage using the lower of foe\'s Def or Res" and unit can counterattack regardless of foe\'s range.'],
                                            ['https://gamepedia.cursecdn.com/feheroes_gamepedia_en/thumb/2/20/Attack_Plus_W.png/24px-Attack_Plus_W.png?version=03eb92be2c1c09baf211f36e03e917d8', '+2 HP, +1 Mt', 'Effective against dragon foes. If foe initiates combat, grants Def/Res+4 during combat.'],
                                            ['https://gamepedia.cursecdn.com/feheroes_gamepedia_en/thumb/0/02/Speed_Plus_W.png/24px-Speed_Plus_W.png?version=0660f5eb80f8f28a4cbd84a1ea3869ac', '+2 HP, +2 Spd', 'Effective against dragon foes. If foe initiates combat, grants Def/Res+4 during combat.'],
                                            ['https://gamepedia.cursecdn.com/feheroes_gamepedia_en/thumb/c/cd/Defense_Plus_W.png/24px-Defense_Plus_W.png?version=792ea3dd75399cb3579b94d8a30bd823', '+2 HP, +3 Def', 'Effective against dragon foes. If foe initiates combat, grants Def/Res+4 during combat.'],
                                            ['https://gamepedia.cursecdn.com/feheroes_gamepedia_en/thumb/5/50/Resistance_Plus_W.png/24px-Resistance_Plus_W.png?version=892af87aa5d6e4ba6cbcb1921bbcd310', '+2 HP, +3 Res', 'Effective against dragon foes. If foe initiates combat, grants Def/Res+4 during combat.']])
Example #4
0
    def test_weapon_is_not_exclusive(self):
        ''' inheritable weapons should be labeled as 'None' under restrictions

        weapon scraper should retrieve weapon exclusivity as 'Restrictions',
        so we can easily grab all exclusive or non-exclusive skills from our Unit Planner
        '''

        skill_name_and_url = ('Armorslayer+', '/Armorslayer%2B')
        weapon_dict = weapon_scraper(skill_name_and_url)
        assert (weapon_dict['Restrictions'] is None)
Example #5
0
    def test_weapon_is_exclusive(self):
        ''' weapons that cannot be inherited should be labeled as exclusive

        weapon scraper should retrieve weapon exclusivity as 'Restrictions',
        so we can easily grab all exclusive or non-exclusive skills from our Unit Planner
        '''

        skill_name_and_url = ('Naga', '/Naga_(tome)')
        weapon_dict = weapon_scraper(skill_name_and_url)
        assert (weapon_dict['Restrictions'] == 'Exclusive')
Example #6
0
    def test_weapon_range(self):
        ''' weapon scraper should retrieve weapon range '''

        skill_name_and_url = ('Naga', '/Naga_(tome)')
        weapon_dict = weapon_scraper(skill_name_and_url)
        assert (weapon_dict['Range'] == '2')
Example #7
0
    def test_weapon_might(self):
        ''' weapon scraper should retrieve weapon might '''

        skill_name_and_url = ('Naga', '/Naga_(tome)')
        weapon_dict = weapon_scraper(skill_name_and_url)
        assert (weapon_dict['Might'] == '14')
Example #8
0
    def test_weapon_name(self):
        ''' weapon scraper should retrieve weapon name even if link is for overlapping weapon names '''

        skill_name_and_url = ('Naga', '/Naga_(tome)')
        weapon_dict = weapon_scraper(skill_name_and_url)
        assert (weapon_dict['Name'] == 'Naga')
Example #9
0
    def test_weapon_has_no_owners(self):
        ''' some weapons dont come with owners (evolved only, umbral) '''

        skill_name_and_url = ('Armorsmasher%2B', "/Armorsmasher%2B")
        weapon_dict = weapon_scraper(skill_name_and_url)
        assert (weapon_dict['List of Owners'] == [])
Example #10
0
    def test_weapon_evolutions(self):
        ''' weapon scraper should retrieve weapon evolution if it exists '''

        skill_name_and_url = ('Naga', '/Naga_(tome)')
        weapon_dict = weapon_scraper(skill_name_and_url)
        assert (weapon_dict['Evolution'] == 'Divine Naga')
Example #11
0
    def test_weapon_description(self):
        ''' weapon scraper should retrieve weapon description '''

        skill_name_and_url = ('Naga', '/Naga_(tome)')
        weapon_dict = weapon_scraper(skill_name_and_url)
        assert (weapon_dict['Description'] == 'Effective against dragon foes. If foe initiates combat, grants Def/Res+2 during combat.')
Example #12
0
    def test_multiple_weapon_requirements(self):
        ''' some weapons have multiple requirements '''

        skill_name_and_url = ('Armorsmasher+', '/Armorsmasher+')
        weapon_dict = weapon_scraper(skill_name_and_url)
        assert (weapon_dict['Required'] == ['Armorsmasher', 'Armorslayer+'])