Skip to content

Commit

Permalink
test: adjust test to geojson format
Browse files Browse the repository at this point in the history
  • Loading branch information
edelclaux committed Sep 30, 2024
1 parent 78010f2 commit 1dea74f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions backend/gn_module_export/tests/test_blueprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,13 @@ def test_export_orderby(self, synthese_data, export_synthese_sinp, users):
)
assert response.status_code == 200, response.data

unordered_id_synthese = [i["id_synthese"] for i in response.json["items"]]
unordered_id_synthese = [
i["properties"]["id_synthese"] for i in response.json["items"]["features"]
]
ordered_id_synthese = sorted(unordered_id_synthese)
assert ordered_id_synthese == unordered_id_synthese

unordered_cd_noms = [i["cd_nom"] for i in response.json["items"]]
unordered_cd_noms = [i["properties"]["cd_nom"] for i in response.json["items"]["features"]]
ordered_cd_noms = sorted(unordered_cd_noms)
assert ordered_cd_noms != unordered_cd_noms
assert set(ordered_cd_noms).issubset(set(unordered_cd_noms))
Expand All @@ -204,7 +206,7 @@ def test_export_orderby(self, synthese_data, export_synthese_sinp, users):
)
)
assert response.status_code == 200, response.data
return_cd_noms = [i["cd_nom"] for i in response.json["items"]]
return_cd_noms = [i["properties"]["cd_nom"] for i in response.json["items"]["features"]]
assert ordered_cd_noms == return_cd_noms

def test_unknown_export(self, exports, users):
Expand Down

0 comments on commit 1dea74f

Please sign in to comment.