Esempio n. 1
0
 def test__parse_death_guard_roster_commander_parses_correctly(self):
     parsed_roster = fetch_and_parse_roster(roster_file=self.death_guard_kill_team_with_commander,
                                            gametype=self.gametype)
     plague_surgeon_commander = parsed_roster[0]
     self.assertTrue(len(plague_surgeon_commander.abilities), 11)
     self.assertTrue(len(plague_surgeon_commander.keywords), 8)
     self.assertTrue(len(plague_surgeon_commander.wargear), 4)
     self.assertTrue(plague_surgeon_commander.wounds, 4)
     self.assertTrue(plague_surgeon_commander.wargear.get('Balesword'))
Esempio n. 2
0
    def test__legion_tactical_squad_has_sarge_and_unit(self):
        parsed_roster = fetch_and_parse_roster(
            roster_file=self.night_lords_zm_force, gametype=self.gametype)
        parsed_units = parsed_roster[1]
        self.assertEqual(len(parsed_units), 3)

        self.assertEqual(parsed_units[0].list_of_units[0].name,
                         'Legion Tactical Space Marine')
        self.assertEqual(parsed_units[0].list_of_units[1].name,
                         'Legion Tactical Sergeant')
Esempio n. 3
0
    def test__praetor_correctly_parsed(self):
        parsed_roster = fetch_and_parse_roster(
            roster_file=self.night_lords_zm_force, gametype=self.gametype)
        parsed_units = parsed_roster[1]

        self.assertTrue(parsed_units[1].list_of_units[0])
        self.assertEqual(len(parsed_units[1].list_of_units), 1)

        self.assertEqual(parsed_units[1].list_of_units[0].name,
                         'Legion Praetor')
        self.assertEqual(parsed_units[1].list_of_units[0].unit_type,
                         'Infantry (Character)')
Esempio n. 4
0
    def test__terror_squad_correctly_parsed(self):
        parsed_roster = fetch_and_parse_roster(
            roster_file=self.night_lords_zm_force, gametype=self.gametype)
        parsed_units = parsed_roster[1]
        self.assertEqual(len(parsed_units[2].list_of_units), 2)

        self.assertEqual(parsed_units[2].list_of_units[0].name, 'Executioner')
        self.assertEqual(parsed_units[2].list_of_units[0].unit_type,
                         'Infantry')

        self.assertEqual(parsed_units[2].list_of_units[1].name, 'Headsman')
        self.assertEqual(parsed_units[2].list_of_units[1].unit_type,
                         'Infantry')
Esempio n. 5
0
    def test__parse_chaos_roster_for_killteam_returns_properly_formatted_asp_champion(self):
        parsed_roster = fetch_and_parse_roster(roster_file=self.chaos_kill_team_standard, gametype=self.gametype)

        aspiring_champion = parsed_roster[0]
        self.assertEqual(aspiring_champion.name, "Aspiring Champion")
        self.assertEqual(aspiring_champion.movement, '6"')
        self.assertEqual(aspiring_champion.attacks, "2")
        self.assertEqual(aspiring_champion.ballistic_skill, "3+")
        self.assertEqual(aspiring_champion.weapon_skill, "3+")
        self.assertEqual(aspiring_champion.strength, '4')
        self.assertEqual(aspiring_champion.toughness, '4')
        self.assertEqual(aspiring_champion.wounds, '1')
        self.assertEqual(aspiring_champion.save, "3+")
        self.assertEqual(aspiring_champion.max, "1")
        self.assertEqual(aspiring_champion.leadership, "8")
        self.assertEqual(len(aspiring_champion.keywords), 6)
        self.assertEqual(len(aspiring_champion.wargear), 5)
        self.assertTrue(aspiring_champion.wargear.get('Power fist'))
        self.assertEqual(len(aspiring_champion.abilities), 3)
        self.assertTrue(aspiring_champion.abilities.get(self.ability_example_name))
Esempio n. 6
0
 def test__parse_tac_squad_with_transport(self):
     parsed_roster = fetch_and_parse_roster(
         roster_file=self.tac_squad_with_transport_only,
         gametype=self.gametype)
     parsed_units = parsed_roster[1]
Esempio n. 7
0
 def test__parse_single_cortus_dread_talon(self):
     parsed_roster = fetch_and_parse_roster(
         roster_file=self.single_cortus_dread_contemptor,
         gametype=self.gametype)
     parsed_units = parsed_roster[1]
     self.assertEqual(len(parsed_units), 1)
Esempio n. 8
0
 def test__parse_roster_with_vehicles_6_items(self):
     parsed_roster = fetch_and_parse_roster(
         roster_file=self.night_lords_zm_force_with_vehicles,
         gametype=self.gametype)
     parsed_units = parsed_roster[1]
     self.assertEqual(len(parsed_units), 8)
Esempio n. 9
0
 def test__parses_three_units_from_roster(self):
     parsed_roster = fetch_and_parse_roster(
         roster_file=self.night_lords_zm_force, gametype=self.gametype)
     parsed_units = parsed_roster[1]
     self.assertEqual(len(parsed_units), 3)
Esempio n. 10
0
 def test__parse_heresy_roster_without_errors(self):
     parsed_roster = fetch_and_parse_roster(
         roster_file=self.night_lords_zm_force, gametype=self.gametype)
     parsed_units = parsed_roster[1]
     self.assertTrue(parsed_units)
Esempio n. 11
0
 def test__parse_death_guard_roster_with_commander_parses_all_units(self):
     parsed_roster = fetch_and_parse_roster(roster_file=self.death_guard_kill_team_with_commander,
                                            gametype=self.gametype)
     self.assertTrue(len(parsed_roster), 8)
Esempio n. 12
0
 def test__parse_chaos_roster_for_killteam_parses_all_units(self):
     parsed_roster = fetch_and_parse_roster(roster_file=self.chaos_kill_team_standard, gametype=self.gametype)
     self.assertEqual(len(parsed_roster), 12)
Esempio n. 13
0
 def test__parse_units_test_for_killteam_returns_list(self):
     parsed_roster = fetch_and_parse_roster(roster_file=self.chaos_kill_team_standard, gametype=self.gametype)
     self.assertTrue(parsed_roster)