Skip to content

Commit af605c8

Browse files
committed
Fix tests
1 parent 67e01d3 commit af605c8

4 files changed

Lines changed: 7 additions & 4 deletions

File tree

tests/__init__.py

Whitespace-only changes.

tests/integration/__init__.py

Whitespace-only changes.

tests/unit/__init__.py

Whitespace-only changes.

tests/unit/test_remote.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def _clear(self):
157157
MockRemoteDataset._meta_queries.clear()
158158

159159
def _get_data(self, filters):
160-
from conftest import TEST_DATA
160+
from tests.conftest import TEST_DATA
161161

162162
if self._side_effect:
163163
raise self._side_effect
@@ -189,7 +189,7 @@ def test_remote_repr(remote_ds):
189189
res = repr(remote_ds)
190190

191191
assert re.search(r"<MockRemoteDataset> \(timeseries:", res)
192-
assert re.search(f"URL: {remote_ds.url()}", res)
192+
assert re.search(f"URL: {re.escape(remote_ds.url())}", res)
193193

194194

195195
def test_remote_len(remote_ds):
@@ -310,10 +310,13 @@ def test_remote_url(remote_ds):
310310
"scenario": "other",
311311
}
312312
).url()
313-
assert res == "https://api.example.com/v1/timeseries?variable=test&scenario=other"
313+
assert (
314+
res
315+
== "https://api.example.com/v1/timeseries?variable=test&scenario=other&format=csv"
316+
)
314317

315318
res = remote_ds.url()
316-
assert res == "https://api.example.com/v1/timeseries"
319+
assert res == "https://api.example.com/v1/timeseries?format=csv"
317320

318321

319322
def test_remote_proxy(remote_ds):

0 commit comments

Comments
 (0)