def test_compare_3(car_plate_object_from_scratch): # Compare car plates from class benchmark = CarPlate.compare(car_plate_object_from_scratch, car_plate_object_from_scratch) for key in benchmark.keys(): if "__acc__" in key: assert benchmark[key] is True
def test_compare_4(car_plate_object_from_scratch): # Compare car plates from class with empty taxes car_plate_object_from_scratch.license_plates = [] benchmark = CarPlate.compare(car_plate_object_from_scratch, car_plate_object_from_scratch) for key in benchmark.keys(): if "__acc__" in key: assert benchmark[key] is True elif "__pre__" in key: assert benchmark[key] in [True, None]
def test_compare_2(car_plate_object, car_plate_object_all_na): # Compare full object and empty object benchmark = CarPlate.compare(car_plate_object, car_plate_object_all_na) for value in benchmark.values(): assert value is False
def test_compare_1(car_plate_object): # Compare same object must return all True benchmark = CarPlate.compare(car_plate_object, car_plate_object) for value in benchmark.values(): assert value is True