Skip to content

Commit

Permalink
test: make tests more flexible if osm data changes
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Apr 8, 2024
1 parent 02b0edb commit 1763131
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/test_postgres.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ def test_data_extract():
aoi_file = open(f"{rootdir}/AOI_small.geojson", "r")
boundary = geojson.load(aoi_file)
data_extract = pg.execQuery(boundary)
assert len(data_extract.get("features")) == 22
# Accounting for minor updates / feature changes
assert len(data_extract.get("features")) > 20


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


def test_parse_reparse_json():
Expand Down

0 comments on commit 1763131

Please sign in to comment.