diff --git a/apptax/taxonomie/routesbiblistes.py b/apptax/taxonomie/routesbiblistes.py index f70bd0d1..512764c9 100644 --- a/apptax/taxonomie/routesbiblistes.py +++ b/apptax/taxonomie/routesbiblistes.py @@ -47,22 +47,3 @@ def get_biblistesbyTaxref(regne, group2_inpn): q = q.where(BibListes.group2_inpn == group2_inpn) results = q.all() return BibListesSchema().dump(results, many=True) - - -@adresses.route("/cor_nom_liste", methods=["GET"]) -@json_resp -def get_cor_nom_liste(): - limit = request.args.get("limit", 20, int) - page = request.args.get("page", 1, int) - q = db.session.query(BibListes.id_liste, Taxref.cd_nom).join(BibListes.noms) - total = q.count() - results = q.paginate(page=page, per_page=limit, error_out=False) - items = [] - for r in results.items: - items.append({"id_liste": r.id_liste, "cd_nom": r.cd_nom}) - return { - "items": items, - "total": total, - "limit": limit, - "page": page, - } diff --git a/apptax/tests/test_biblistes.py b/apptax/tests/test_biblistes.py index 6b8d2856..3e7c161f 100644 --- a/apptax/tests/test_biblistes.py +++ b/apptax/tests/test_biblistes.py @@ -17,15 +17,6 @@ class TestApiBibListe: } ) - def test_cor_nom_liste(self, noms_example): - response = self.client.get( - url_for("bib_listes.get_cor_nom_liste"), - ) - assert response.status_code == 200 - data = response.json - assert len(data["items"]) > 0 - self.schema_cor_nom_liste.validate(data) - schema_allnamebyListe = Schema( [ {