]> git.openstreetmap.org Git - nominatim.git/blobdiff - test/python/api/test_results.py
Merge remote-tracking branch 'upstream/master'
[nominatim.git] / test / python / api / test_results.py
index 232740b417fa759fa6624c83fc22f564f9cb4c6f..54a5454945860618a61ebf01317871b9db90cc4d 100644 (file)
@@ -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,