From 04f5b0226426a6342f902bd995ca6ec7589d16ea Mon Sep 17 00:00:00 2001 From: Pierre-Narcisi Date: Wed, 8 Jan 2025 09:34:54 +0100 Subject: [PATCH] feat(tests) add test --- backend/geonature/tests/test_gn_meta.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/backend/geonature/tests/test_gn_meta.py b/backend/geonature/tests/test_gn_meta.py index 94330c77f9..a32f83cc12 100644 --- a/backend/geonature/tests/test_gn_meta.py +++ b/backend/geonature/tests/test_gn_meta.py @@ -508,6 +508,19 @@ def test_get_export_pdf_acquisition_frameworks(self, users, acquisition_framewor assert response.status_code == 200 + def test_get_export_pdf_acquisition_frameworks_with_data( + self, users, acquisition_frameworks, datasets + ): + af_id = acquisition_frameworks["af_1"].id_acquisition_framework + + set_logged_user(self.client, users["user"]) + + response = self.client.post( + url_for("gn_meta.get_export_pdf_acquisition_frameworks", id_acquisition_framework=af_id) + ) + + assert response.status_code == 200 + def test_get_export_pdf_acquisition_frameworks_unauthorized(self, acquisition_frameworks): af_id = acquisition_frameworks["own_af"].id_acquisition_framework