File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed
Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ api.search_car(
5454 colors = [CarColor.GULD ],
5555 price_from = 10000 ,
5656 price_to = 50000 ,
57- transmission = CarTransmission.MANUAL ,
57+ transmissions = [ CarTransmission.MANUAL ] ,
5858 locations = [Location.STOCKHOLM ],
5959)
6060
Original file line number Diff line number Diff line change @@ -80,7 +80,7 @@ def search_car(
8080 milage_from : int | None = None ,
8181 milage_to : int | None = None ,
8282 colors : list [CarColor ] = [],
83- transmission : list [CarTransmission ] = [],
83+ transmissions : list [CarTransmission ] = [],
8484 ) -> Any :
8585 url = f"{ SITE_URL } /mobility/search/api/search/SEARCH_ID_CAR_USED"
8686 params = [
@@ -95,7 +95,7 @@ def search_car(
9595 * ([QueryParam ("milage_from" , milage_from )] if milage_from else []),
9696 * ([QueryParam ("milage_to" , milage_to )] if milage_to else []),
9797 * [QueryParam ("exterior_colour" , color .value ) for color in colors ],
98- * [QueryParam ("transmission" , t .value ) for t in transmission ],
98+ * [QueryParam ("transmission" , t .value ) for t in transmissions ],
9999 ]
100100
101101 return _request (url = url , params = params ).json ()
Original file line number Diff line number Diff line change 66 CarAd ,
77 CarModel ,
88 CarSortOrder ,
9+ CarTransmission ,
910 Category ,
1011 Location ,
1112 RecommerceAd ,
@@ -111,6 +112,7 @@ def test_search_car(self) -> None:
111112 "&make=0.744"
112113 "&price_from=1000"
113114 "&price_to=50000"
115+ "&transmission=2"
114116 )
115117 respx .get (expected_url ).mock (
116118 return_value = httpx .Response (200 , json = {"status" : "ok" })
@@ -120,6 +122,7 @@ def test_search_car(self) -> None:
120122 models = [CarModel .AUDI ],
121123 price_from = 1000 ,
122124 price_to = 50000 ,
125+ transmissions = [CarTransmission .AUTOMATIC ],
123126 )
124127 assert result == {"status" : "ok" }
125128
You can’t perform that action at this time.
0 commit comments