split SearchResult type

Use adapted types for the different result types. This makes it
easier to have adapted output formatting and means there are only
result fields that are filled.
This commit is contained in:
Sarah Hoffmann
2023-03-14 14:21:35 +01:00
parent d03fd3f883
commit 00e3a752c9
10 changed files with 274 additions and 148 deletions

View File

@@ -79,8 +79,8 @@ class TestCliDetailsCall:
@pytest.fixture(autouse=True)
def setup_status_mock(self, monkeypatch):
result = napi.SearchResult(napi.SourceTable.PLACEX, ('place', 'thing'),
napi.Point(1.0, -3.0))
result = napi.DetailedResult(napi.SourceTable.PLACEX, ('place', 'thing'),
napi.Point(1.0, -3.0))
monkeypatch.setattr(napi.NominatimAPI, 'lookup',
lambda *args: result)