Skip to content

Commit 1763131

Browse files
committed
test: make tests more flexible if osm data changes
1 parent 02b0edb commit 1763131

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/test_postgres.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ def test_data_extract():
4444
aoi_file = open(f"{rootdir}/AOI_small.geojson", "r")
4545
boundary = geojson.load(aoi_file)
4646
data_extract = pg.execQuery(boundary)
47-
assert len(data_extract.get("features")) == 22
47+
# Accounting for minor updates / feature changes
48+
assert len(data_extract.get("features")) > 20
4849

4950

5051
def test_fgb_data_extract():
@@ -69,7 +70,8 @@ def test_fgb_data_extract():
6970
with requests.head(extract_url) as response:
7071
assert response.status_code == 200
7172
assert response.headers["Content-Type"] == "binary/octet-stream"
72-
assert response.headers["Content-Length"] == "10704"
73+
# Accounting for minor updates / filesize change
74+
assert response.headers["Content-Length"] > "10000"
7375

7476

7577
def test_parse_reparse_json():

0 commit comments

Comments
 (0)