Skip to content

Commit

Permalink
Add asset type de site (#282)
Browse files Browse the repository at this point in the history
* Add asset type de site
  • Loading branch information
amandine-sahl authored Dec 8, 2023
1 parent 4b2c4d5 commit 616a5a6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 3 additions & 4 deletions backend/gn_module_monitoring/tests/fixtures/site.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ def site_to_post_with_types(users, types_site, site_group_without_sites):
site_to_post_with_types = TMonitoringSites(
id_inventor=user.id_role,
id_digitiser=user.id_role,
base_site_name=f"New Site",
base_site_description=f"New Description",
base_site_code=f"New Code",
base_site_name="New Site",
base_site_description="New Description",
base_site_code="New Code",
geom=geom_4326,
id_nomenclature_type_site=list_nomenclature_id[0],
# types_site=list_nomenclature_id,
Expand All @@ -86,7 +86,6 @@ def site_to_post_with_types(users, types_site, site_group_without_sites):
post_data["type"] = "Feature"
post_data["properties"]["types_site"] = list_nomenclature_id


for type_site in mock_db_type_site:
specific_config = type_site["config"]["specific"]
for key_specific in specific_config:
Expand Down
2 changes: 2 additions & 0 deletions backend/gn_module_monitoring/tests/test_routes/test_site.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@ def test_post_sites(
== site_to_post_with_types["properties"]["base_site_name"]
)

assert set(res.types_site) == set([ts for k, ts in types_site.items()])

def test_delete_site(self, sites, monitorings_users):
set_logged_user_cookie(self.client, monitorings_users["admin_user"])
site = list(sites.values())[0]
Expand Down

0 comments on commit 616a5a6

Please sign in to comment.