From 37fe0d1e4772975eae6972510fc772bb23a126ee Mon Sep 17 00:00:00 2001 From: amandine-sahl Date: Fri, 10 Nov 2023 09:03:29 +0100 Subject: [PATCH] Taxref schema --- apptax/tests/test_taxref.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/apptax/tests/test_taxref.py b/apptax/tests/test_taxref.py index 15975fca..cf806104 100644 --- a/apptax/tests/test_taxref.py +++ b/apptax/tests/test_taxref.py @@ -27,14 +27,14 @@ class TestAPITaxref: [ { "cd_nom": int, - "id_statut": str, - "id_habitat": int, + "id_statut": Or(None, str), + "id_habitat": Or(None, int), "id_rang": str, - "phylum": str, + "phylum": Or(None, str), "classe": Or(None, str), - "regne": str, - "ordre": str, - "famille": str, + "regne": Or(None, str), + "ordre": Or(None, str), + "famille": Or(None, str), "sous_famille": Or(None, str), "tribu": Or(None, str), "cd_taxsup": Or(None, int), @@ -49,7 +49,7 @@ class TestAPITaxref: "nom_vern_eng": Or(None, str), "group1_inpn": str, "group2_inpn": str, - "group3_inpn": str, + "group3_inpn": Or(None, str), "url": Or(None, str), "lists": [int], } @@ -128,7 +128,7 @@ def test_get_allnamebyListe_routes_without_list_filter_group3(self): assert self.schema_allnamebyListe.is_valid(data) def test_get_names_routes(self): - query_string = {"limit": 10} + query_string = {"limit": 100} response = self.client.get(url_for("taxref.get_names"), query_string=query_string) assert response.status_code == 200 data = response.json