Skip to content

Commit

Permalink
Add class to schema_taxref_detail
Browse files Browse the repository at this point in the history
  • Loading branch information
amandine-sahl committed Oct 23, 2023
1 parent 3be4be0 commit 14bb2ca
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions apptax/tests/test_taxref.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,17 @@ class TestAPITaxref:
}
]
)

schema_taxref_detail = Schema(
{
"cd_nom": int,
"cd_ref": int,
"cd_sup": int,
"cd_taxsup": int,
"phylum": str,
"regne": str,
Optional("classe"): str,
"ordre": str,
"famille": str,
"group1_inpn": str,
"group2_inpn": str,
Expand All @@ -40,9 +45,6 @@ class TestAPITaxref:
"nom_statut": str,
"nom_valide": str,
"nom_vern": str,
"ordre": str,
"phylum": str,
"regne": str,
"status": dict,
"synonymes": [
{
Expand Down Expand Up @@ -134,7 +136,6 @@ def test_taxrefDetail_routes(self):
assert response.status_code == 200
data = response.json
if data:
self.schema_taxref_detail.validate(data)
assert self.schema_taxref_detail.is_valid(data)

def test_searchTaxref_routes(self):
Expand Down

0 comments on commit 14bb2ca

Please sign in to comment.