return an error when q is used together with structured parameters

This commit is contained in:
Sarah Hoffmann
2023-08-08 15:54:55 +02:00
parent 78648f1faf
commit 282c0da941
2 changed files with 13 additions and 7 deletions

View File

@@ -508,9 +508,8 @@ class TestSearchEndPointSearch:
a.params['q'] = 'something'
a.params['city'] = 'ignored'
res = await glue.search_endpoint(napi.NominatimAPIAsync(Path('/invalid')), a)
assert len(json.loads(res.output)) == 1
with pytest.raises(FakeError, match='^400 -- .*cannot be used together'):
res = await glue.search_endpoint(napi.NominatimAPIAsync(Path('/invalid')), a)
@pytest.mark.asyncio