Skip to content

Commit

Permalink
removed multi file bhv from Documento
Browse files Browse the repository at this point in the history
  • Loading branch information
daniele-andreotti committed Sep 23, 2024
1 parent 597151f commit 4d5ca1f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
<element value="iosanita.contenttypes.behavior.a_chi_si_rivolge" />
<element value="collective.taxonomy.generated.a_chi_si_rivolge_tassonomia" />
<element value="collective.taxonomy.generated.parliamo_di" />
<element value="iosanita.contenttypes.behavior.multi_file" />
</property>

<!-- View information -->
Expand Down
1 change: 0 additions & 1 deletion src/iosanita/contenttypes/restapi/services/types/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ class FieldsetsMismatchError(Exception):
],
"Documento": [
"default",
"formati",
"cosa_e",
"riferimenti",
"a_chi_si_rivolge",
Expand Down
20 changes: 4 additions & 16 deletions src/iosanita/contenttypes/tests/test_ct_documento.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ def test_behaviors_enabled_for_documento(self):
"iosanita.contenttypes.behavior.a_chi_si_rivolge",
"collective.taxonomy.generated.a_chi_si_rivolge_tassonomia",
"collective.taxonomy.generated.parliamo_di",
"iosanita.contenttypes.behavior.multi_file",
),
)

Expand All @@ -64,12 +63,11 @@ def test_documento_fieldsets(self):
Get the list from restapi
"""
resp = self.api_session.get("@types/Documento").json()
self.assertEqual(len(resp["fieldsets"]), 10)
self.assertEqual(len(resp["fieldsets"]), 9)
self.assertEqual(
[x.get("id") for x in resp["fieldsets"]],
[
"default",
"formati",
"cosa_e",
"riferimenti",
"a_chi_si_rivolge",
Expand Down Expand Up @@ -116,23 +114,13 @@ def test_documento_fields_default_fieldset(self):
],
)

def test_documento_formati_fieldset(self):
"""
Get the list from restapi
"""
resp = self.api_session.get("@types/Documento").json()
self.assertEqual(
resp["fieldsets"][1]["fields"],
["file", "formato_alternativo_1", "formato_alternativo_2"],
)

def test_documento_cosa_e_fieldset(self):
"""
Get the list from restapi
"""
resp = self.api_session.get("@types/Documento").json()
self.assertEqual(
resp["fieldsets"][2]["fields"],
resp["fieldsets"][1]["fields"],
["descrizione_estesa"],
)

Expand All @@ -142,7 +130,7 @@ def test_documento_riferimenti_fieldset(self):
"""
resp = self.api_session.get("@types/Documento").json()
self.assertEqual(
resp["fieldsets"][3]["fields"],
resp["fieldsets"][2]["fields"],
[
"servizio_procedura_riferimento",
"uo_correlata",
Expand All @@ -156,7 +144,7 @@ def test_documento_fields_a_chi_si_rivolge_fieldset(self):
"""
resp = self.api_session.get("@types/Documento").json()
self.assertEqual(
resp["fieldsets"][4]["fields"],
resp["fieldsets"][3]["fields"],
["a_chi_si_rivolge", "a_chi_si_rivolge_tassonomia"],
)

Expand Down

0 comments on commit 4d5ca1f

Please sign in to comment.