示例#1
0
def test_car_getters():
    car = Car(1, "BOB", "Jhon")
    assert str(car.get_id()).isdecimal()
    assert car.get_owner().isalpha()
    assert car.get_number().isalpha()
    assert car.get_id() == 1
    assert car.get_number() == "BOB"
    assert car.get_owner() == "Jhon"
示例#2
0
def test_car_setters():
    car = Car(1, "BOB", "Jhon")
    car.set_owner("IAN")
    car.set_number("NIG")
    car.set_id(2)
    assert car.get_id() == 2
    assert car.get_owner() == "IAN"
    assert car.get_number() == "NIG"