Exemplo n.º 1
0
def test_split_string_into_key_value_ineligible():
    test_string = "Acura CL ineligible"
    expected = Car("Acura", "CL", "ineligible")

    actual = Car.car_from_string(test_string)
    assert actual == expected
Exemplo n.º 2
0
def test_string_to_car():
    test_string = "Acura CL H Street HS"
    expected = Car("Acura", "CL", "H Street")

    actual = Car.car_from_string(test_string)
    assert actual == expected
Exemplo n.º 3
0
 def change_list_of_strings_to_list_of_cars(self):
     car_list = []
     for row in cars:
         car_object = Car.car_from_string(row)
         car_list.append(car_object)
     return car_list