Skip to content

Commit

Permalink
Feat(ares) add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Narcisi committed Apr 3, 2024
1 parent ad7348d commit d055810
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/ref_geo/tests/test_ref_geo.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,23 @@ def test_get_areas_area_name(self):
assert response.status_code == 200
assert response.json[0]["area_name"] == CITY

def test_get_without_geom(self):
response = self.client.get(
url_for("ref_geo.get_areas"), query_string={"without_geom": False}
)
assert response.status_code == 200
for area in response.json:
print(area)
assert area["geom"]

response = self.client.get(
url_for("ref_geo.get_areas"), query_string={"without_geom": True}
)
assert response.status_code == 200
for area in response.json:
print(area)
assert not area["geom"]

def test_get_areas_as_geojson(self, area_commune):
"""
This test can't try to get only one commune
Expand Down

0 comments on commit d055810

Please sign in to comment.