Skip to content

Commit

Permalink
tests for Honda Pilot models from vPIC
Browse files Browse the repository at this point in the history
  • Loading branch information
davidpeckham committed Feb 29, 2024
1 parent 1d5efeb commit c58e4ab
Show file tree
Hide file tree
Showing 3 changed files with 1,905 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/vin/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ def decode_vin(wmi: str, vds: str, model_year: int) -> dict | None:
left join country on country.alpha_2_code = wmi.country
left join make_model on make_model.model_id = pattern.model_id
left join make on make.id = make_model.make_id
-- left join make as default_make on default_make.id = wmi.make_id
left join model on model.id = pattern.model_id
left join series on series.id = pattern.series_id
left join trim on trim.id = pattern.trim_id
Expand Down
32 changes: 32 additions & 0 deletions tests/cars/test_honda.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import parametrize_from_file
from vin import VIN


@parametrize_from_file
def test_honda(
vin: str,
model_year: int,
make: str,
model: str,
series: str,
trim: str,
body_class: str,
electrification_level: str,
) -> None:
v = VIN(vin)
# assert f"{model_year} {make} {model}".rstrip().replace(" ", " ") == v.description
assert model_year == v.model_year
assert make.lower() == v.make.lower()
assert model == v.model

if series:
assert series == v.series

if trim:
assert trim == v.trim

if body_class:
assert body_class == v.body_class

if electrification_level:
assert electrification_level == v.electrification_level
Loading

0 comments on commit c58e4ab

Please sign in to comment.