@@ -21,7 +21,10 @@ def test_list_datasets_sends_expected_request(self, mocker) -> None:
2121
2222 # Assert
2323 call = mocked_get .call_args .kwargs
24- assert call ["url" ] == "https://hist.databento.com/v1/metadata.list_datasets"
24+ assert (
25+ call ["url" ]
26+ == f"https://hist.databento.com/v{ db .API_VERSION } /metadata.list_datasets"
27+ )
2528 assert ("start" , "2018-01-01T00:00:00" ) in call ["params" ]
2629 assert ("end" , "2020-01-01T00:00:00" ) in call ["params" ]
2730 assert call ["headers" ] == {"accept" : "application/json" }
@@ -42,7 +45,10 @@ def test_list_schemas_sends_expected_request(self, mocker) -> None:
4245
4346 # Assert
4447 call = mocked_get .call_args .kwargs
45- assert call ["url" ] == "https://hist.databento.com/v1/metadata.list_schemas"
48+ assert (
49+ call ["url" ]
50+ == f"https://hist.databento.com/v{ db .API_VERSION } /metadata.list_schemas"
51+ )
4652 assert ("start" , "2018-01-01T00:00:00" ) in call ["params" ]
4753 assert ("end" , "2021-01-01T00:00:00" ) in call ["params" ]
4854 assert call ["headers" ] == {"accept" : "application/json" }
@@ -63,7 +69,10 @@ def test_list_fields_sends_expected_request(self, mocker) -> None:
6369
6470 # Assert
6571 call = mocked_get .call_args .kwargs
66- assert call ["url" ] == "https://hist.databento.com/v1/metadata.list_fields"
72+ assert (
73+ call ["url" ]
74+ == f"https://hist.databento.com/v{ db .API_VERSION } /metadata.list_fields"
75+ )
6776 assert ("schema" , "mbo" ) in call ["params" ]
6877 assert ("encoding" , "dbz" ) in call ["params" ]
6978 assert call ["headers" ] == {"accept" : "application/json" }
@@ -80,7 +89,10 @@ def test_list_encodings_sends_expected_request(self, mocker) -> None:
8089
8190 # Assert
8291 call = mocked_get .call_args .kwargs
83- assert call ["url" ] == "https://hist.databento.com/v1/metadata.list_encodings"
92+ assert (
93+ call ["url" ]
94+ == f"https://hist.databento.com/v{ db .API_VERSION } /metadata.list_encodings"
95+ )
8496 assert call ["headers" ] == {"accept" : "application/json" }
8597 assert call ["timeout" ] == (100 , 100 )
8698 assert isinstance (call ["auth" ], requests .auth .HTTPBasicAuth )
@@ -95,7 +107,10 @@ def test_list_compressions_sends_expected_request(self, mocker) -> None:
95107
96108 # Assert
97109 call = mocked_get .call_args .kwargs
98- assert call ["url" ] == "https://hist.databento.com/v1/metadata.list_compressions"
110+ assert (
111+ call ["url" ]
112+ == f"https://hist.databento.com/v{ db .API_VERSION } /metadata.list_compressions" # noqa
113+ )
99114 assert call ["headers" ] == {"accept" : "application/json" }
100115 assert call ["timeout" ] == (100 , 100 )
101116 assert isinstance (call ["auth" ], requests .auth .HTTPBasicAuth )
@@ -123,7 +138,10 @@ def test_list_unit_price_sends_expected_request(
123138
124139 # Assert
125140 call = mocked_get .call_args .kwargs
126- assert call ["url" ] == "https://hist.databento.com/v1/metadata.list_unit_prices"
141+ assert (
142+ call ["url" ]
143+ == f"https://hist.databento.com/v{ db .API_VERSION } /metadata.list_unit_prices"
144+ )
127145 assert call ["headers" ] == {"accept" : "application/json" }
128146 assert call ["params" ] == [
129147 ("dataset" , "glbx.mdp3" ),
@@ -150,7 +168,10 @@ def test_get_shape_sends_expected_request(self, mocker) -> None:
150168
151169 # Assert
152170 call = mocked_get .call_args .kwargs
153- assert call ["url" ] == "https://hist.databento.com/v1/metadata.get_shape"
171+ assert (
172+ call ["url" ]
173+ == f"https://hist.databento.com/v{ db .API_VERSION } /metadata.get_shape"
174+ )
154175 assert call ["headers" ] == {"accept" : "application/json" }
155176 assert call ["params" ] == [
156177 ("dataset" , "glbx.mdp3" ),
@@ -182,7 +203,10 @@ def test_get_billable_size_sends_expected_request(self, mocker) -> None:
182203
183204 # Assert
184205 call = mocked_get .call_args .kwargs
185- assert call ["url" ] == "https://hist.databento.com/v1/metadata.get_billable_size"
206+ assert (
207+ call ["url" ]
208+ == f"https://hist.databento.com/v{ db .API_VERSION } /metadata.get_billable_size" # noqa
209+ )
186210 assert call ["headers" ] == {"accept" : "application/json" }
187211 assert call ["params" ] == [
188212 ("dataset" , "glbx.mdp3" ),
@@ -214,7 +238,10 @@ def test_cost_sends_expected_request(self, mocker) -> None:
214238
215239 # Assert
216240 call = mocked_get .call_args .kwargs
217- assert call ["url" ] == "https://hist.databento.com/v1/metadata.get_cost"
241+ assert (
242+ call ["url" ]
243+ == f"https://hist.databento.com/v{ db .API_VERSION } /metadata.get_cost"
244+ )
218245 assert call ["headers" ] == {"accept" : "application/json" }
219246 assert call ["params" ] == [
220247 ("dataset" , "glbx.mdp3" ),
0 commit comments