add a WKB decoder for the Point class

This allows to return point geometries from the database and makes
the SQL a bit simpler.
This commit is contained in:
Sarah Hoffmann
2023-02-16 15:35:54 +01:00
parent b320f1c7e3
commit ee0c5e24bb
5 changed files with 39 additions and 22 deletions

View File

@@ -80,7 +80,7 @@ class TestCliDetailsCall:
@pytest.fixture(autouse=True)
def setup_status_mock(self, monkeypatch):
result = napi.SearchResult(napi.SourceTable.PLACEX, ('place', 'thing'),
(1.0, -3.0))
napi.Point(1.0, -3.0))
monkeypatch.setattr(napi.NominatimAPI, 'lookup',
lambda *args: result)
@@ -90,7 +90,7 @@ class TestCliDetailsCall:
('--relation', '1'),
('--place_id', '10001')])
def test_status_json_format(self, cli_call, tmp_path, capsys, params):
def test_details_json_format(self, cli_call, tmp_path, capsys, params):
result = cli_call('details', '--project-dir', str(tmp_path), *params)
assert result == 0