X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/566ac7af993f487e249185ddae59bc38c38f84de..a234d606c9dcd76db1d69909bb78940d3dbcd862:/test/python/api/test_results.py diff --git a/test/python/api/test_results.py b/test/python/api/test_results.py index 232740b4..54a54549 100644 --- a/test/python/api/test_results.py +++ b/test/python/api/test_results.py @@ -23,6 +23,8 @@ def mkpoint(x, y): class FakeRow: def __init__(self, **kwargs): + if 'parent_place_id' not in kwargs: + kwargs['parent_place_id'] = None for k, v in kwargs.items(): setattr(self, k, v) self._mapping = kwargs @@ -35,7 +37,7 @@ def test_minimal_detailed_result(): assert res.lon == 23.1 assert res.lat == 0.5 - assert res.calculated_importance() == pytest.approx(0.0000001) + assert res.calculated_importance() == pytest.approx(0.00001) def test_detailed_result_custom_importance(): res = DetailedResult(SourceTable.PLACEX,