enable flake for Python tests

This commit is contained in:
Sarah Hoffmann
2025-03-09 15:33:24 +01:00
parent 5a245e33e0
commit 4cc788f69e
93 changed files with 949 additions and 1191 deletions

View File

@@ -2,21 +2,21 @@
#
# This file is part of Nominatim. (https://nominatim.org)
#
# Copyright (C) 2024 by the Nominatim developer community.
# Copyright (C) 2025 by the Nominatim developer community.
# For a full list of authors see the git log.
"""
Tests for the deletable v1 API call.
"""
import json
import datetime as dt
from pathlib import Path
import pytest
from fake_adaptor import FakeAdaptor, FakeError, FakeResponse
from fake_adaptor import FakeAdaptor
import nominatim_api.v1.server_glue as glue
class TestPolygonsEndPoint:
@pytest.fixture(autouse=True)
@@ -35,13 +35,12 @@ class TestPolygonsEndPoint:
errormessage text,
prevgeometry geometry(Geometry,4326),
newgeometry geometry(Geometry,4326)""",
content=[(345, 'N', 'boundary', 'administrative',
{'name': 'Foo'}, 'xx', self.recent,
'some text', None, None),
(781, 'R', 'landuse', 'wood',
None, 'ds', self.now,
'Area reduced by lots', None, None)])
content=[(345, 'N', 'boundary', 'administrative',
{'name': 'Foo'}, 'xx', self.recent,
'some text', None, None),
(781, 'R', 'landuse', 'wood',
None, 'ds', self.now,
'Area reduced by lots', None, None)])
@pytest.mark.asyncio
async def test_polygons_simple(self, api):
@@ -63,7 +62,6 @@ class TestPolygonsEndPoint:
'errormessage': 'Area reduced by lots',
'updated': self.now.isoformat(sep=' ', timespec='seconds')}]
@pytest.mark.asyncio
async def test_polygons_days(self, api):
a = FakeAdaptor()
@@ -74,7 +72,6 @@ class TestPolygonsEndPoint:
assert [r['osm_id'] for r in results] == [781]
@pytest.mark.asyncio
async def test_polygons_class(self, api):
a = FakeAdaptor()
@@ -85,8 +82,6 @@ class TestPolygonsEndPoint:
assert [r['osm_id'] for r in results] == [781]
@pytest.mark.asyncio
async def test_polygons_reduced(self, api):
a = FakeAdaptor()