コード例 #1
0
def build_airport(airport_html, staff_html):
    country = get_country(airport_html)
    money = get_money(airport_html)
    kerosene_supply = get_kerosene_supply(airport_html)
    kerosene_capacity = get_kerosene_capacity(airport_html)
    engines_supply = get_engines_supply(airport_html)
    planes_capacity = get_planes_capacity(airport_html)
    airport_name = get_airport_name(airport_html)
    staff = build_staff(staff_html)
    return Airport(country=country, money=money, kerosene_supply=kerosene_supply, kerosene_capacity=kerosene_capacity,
                   engines_supply=engines_supply, planes_capacity=planes_capacity,
                   airport_name=airport_name, staff=staff)
コード例 #2
0
 def test_engines_supply(self):
     engines_supply = get_engines_supply(self.__html_page)
     self.assertEqual(engines_supply['5'], 1000)
     self.assertEqual(engines_supply['6'], 2)