def test_get_all_makes(self, typed_client: TypedClient, responses): makes: List[Make] = typed_client.get_all_makes() assert len(makes) == 9628 assert makes[0].make == "ASTON MARTIN" assert makes[0].make_id == 440 assert makes[1].make == "TESLA" assert makes[1].make_id == 441
def test_get_vehicle_variable_values_list(self, typed_client: TypedClient, responses): values: List[Value] = typed_client.get_vehicle_variable_values_list( "Vehicle Type") assert len(values) == 9 assert values[0].id == 1 assert values[0].name == "Motorcycle"
def test_decode_vin_with_model_year(self, typed_client: TypedClient, responses): vehicle = typed_client.decode_vin("1FTMW1T88MFA00001", 2021) assert vehicle.make == "FORD" assert vehicle.model == "F-150" assert vehicle.trim == "SuperCrew-SSV" assert vehicle.vehicle_type == "TRUCK "
def test_get_manufacturer_details_by_partial_name( self, typed_client: TypedClient, responses): details: List[ ManufacturerDetail] = typed_client.get_manufacturer_details( "METRO") assert details[0].manufacturer_id == 3382 assert details[0].manufacturer == "NICHIBEI METROPAGES, INC." assert details[0].manufacturer_common_name is None
def test_get_manufacturer_details_name(self, typed_client: TypedClient, responses): details: List[ ManufacturerDetail] = typed_client.get_manufacturer_details( "Honda") assert details[0].manufacturer_id == 987 assert details[0].manufacturer == "HONDA MOTOR CO., LTD" assert details[0].manufacturer_common_name == "Honda"
def test_get_vehicle_variable_list(self, typed_client: TypedClient, responses): variables: List[Variable] = typed_client.get_vehicle_variable_list() assert len(variables) == 138 assert hasattr(variables[0], "data_type") assert hasattr(variables[0], "description") assert hasattr(variables[0], "group_name") assert hasattr(variables[0], "id") assert hasattr(variables[0], "name") assert variables[0].id == 1
def test_decode_wmi(self, typed_client: TypedClient, responses): wmi: WMI = typed_client.decode_wmi("1FT") assert wmi.common_name == "Ford" assert wmi.created_on == "2015-03-23" assert wmi.date_available_to_public == "2015-01-01" assert wmi.make == "FORD" assert wmi.manufacturer == "FORD MOTOR COMPANY, USA" assert wmi.parent_company_name == "" assert wmi.updated_on is None assert wmi.url == "http://www.ford.com/" assert wmi.vehicle_type == "Truck "
def test_get_manufacturer_details(self, typed_client: TypedClient, responses): details: List[ ManufacturerDetail] = typed_client.get_manufacturer_details(988) assert len(details) == 1 honda = details[0] assert honda.manufacturer_id == 988 assert (honda.manufacturer == "HONDA DEVELOPMENT & MANUFACTURING OF AMERICA, LLC") assert honda.manufacturer_common_name == "Honda" assert honda.manufacturer_types is not None if honda.manufacturer_types is not None: assert honda.manufacturer_types[ 0].name == "Completed Vehicle Manufacturer"
def test_decode_vin_batch(self, typed_client: TypedClient, responses): vehicles = typed_client.decode_vin_batch( ["5UXWX7C5*BA,2011", "5YJSA3DS*EF"]) bmw = vehicles[0] assert bmw.model_year == "2011" assert bmw.make == "BMW" assert bmw.model == "X3" assert bmw.trim == "xDrive35i" assert bmw.vehicle_type == "MULTIPURPOSE PASSENGER VEHICLE (MPV)" tesla = vehicles[1] assert tesla.model_year == "2014" assert tesla.make == "TESLA" assert tesla.model == "Model S" assert tesla.trim == "w/DC Fast Charge" assert tesla.vehicle_type == "PASSENGER CAR"
def test_get_makes_for_vehicle_type(self, typed_client: TypedClient, responses): makes: List[Make] = typed_client.get_makes_for_vehicle_type("Car") assert len(makes) == 167
def test_get_vehicle_types_for_make_name(self, typed_client: TypedClient, responses): types: List[VehicleType] = typed_client.get_vehicle_types_for_make( "kia") assert len(types) == 3
def test_get_parts_566(self, typed_client: TypedClient, responses): documents: List[Document] = typed_client.get_parts( "566", "2016-02-01", "2016-02-15", 1) assert len(documents) == 15
def test_get_parts_565(self, typed_client: TypedClient, responses): documents: List[Document] = typed_client.get_parts( "565", "2015-01-01", "2015-05-05", 1) assert len(documents) == 175
def test_get_wmis_for_manufacturerid(self, typed_client: TypedClient, responses): wmis: List[WMI] = typed_client.get_wmis_for_manufacturer(988) assert len(wmis) == 20
def test_get_models_for_make_year_vehicletype(self, typed_client: TypedClient, responses): models: List[Model] = typed_client.get_models_for_make( "TESLA", model_year=2020, vehicle_type="Car") assert len(models) == 4
def test_get_makes_for_manufacturer_by_partial_name( self, typed_client: TypedClient, responses): makes: List[Make] = typed_client.get_makes_for_manufacturer("METRO") assert len(makes) == 4
def test_get_vehicle_variable_values_list(self, typed_client: TypedClient): values: List[Value] = typed_client.get_vehicle_variable_values_list( "Vehicle Type") pass
def test_get_wmis_for_manufacturer_partialname(self, typed_client: TypedClient, responses): wmis: List[WMI] = typed_client.get_wmis_for_manufacturer("TECHNOLOG") assert len(wmis) == 101
def test_get_wmis_for_manufacturer_name(self, typed_client: TypedClient, responses): wmis: List[WMI] = typed_client.get_wmis_for_manufacturer("Honda") assert len(wmis) == 44
def test_get_models_for_makeid(self, typed_client: TypedClient, responses): models: List[Model] = typed_client.get_models_for_make(441) assert len(models) == 5
def test_get_canadian_vehicle_specifications(self, typed_client: TypedClient, responses): models: List[Model] = typed_client.get_canadian_vehicle_specifications( 2011, make="Acura", model="", units="") assert len(models) == 10
def test_get_makes_for_manufacturerid_and_modelyear( self, typed_client: TypedClient, responses): makes: List[Make] = typed_client.get_makes_for_manufacturer(988, 2021) assert len(makes) == 2
def test_decode_partial_vin(self, typed_client: TypedClient, responses): vehicle = typed_client.decode_vin("5UXWX7C5*BA", 2011) assert vehicle.make == "BMW" assert vehicle.model == "X3" assert vehicle.trim == "xDrive35i" assert vehicle.vehicle_type == "MULTIPURPOSE PASSENGER VEHICLE (MPV)"
def test_get_models_for_makeid_vehicletype(self, typed_client: TypedClient, responses): models: List[Model] = typed_client.get_models_for_make( 441, vehicle_type="Car") assert len(models) == 5
def test_get_equipment_plant_codes(self, typed_client: TypedClient, responses): plant_codes: List[PlantCode] = typed_client.get_equipment_plant_codes( 2016, 1) assert len(plant_codes) == 1091 assert hasattr(plant_codes[0], "dot_code")
def test_get_models_for_make_year(self, typed_client: TypedClient, responses): models: List[Model] = typed_client.get_models_for_make("TESLA", model_year=2020) assert len(models) == 4
def test_get_makes_for_vehicle_type(self, typed_client: TypedClient): makes: List[Make] = typed_client.get_makes_for_vehicle_type("Truck ") pass
def test_get_makes_for_manufacturer(self, typed_client: TypedClient, responses): makes: List[Make] = typed_client.get_makes_for_manufacturer(988) assert len(makes) == 2