diff --git a/src/ref_geo/tests/test_ref_geo.py b/src/ref_geo/tests/test_ref_geo.py index e0ac3da..da9a1d7 100644 --- a/src/ref_geo/tests/test_ref_geo.py +++ b/src/ref_geo/tests/test_ref_geo.py @@ -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