From abb7d01d90afee9315b4aba4cf4df2343006b7b9 Mon Sep 17 00:00:00 2001 From: HAEKADI Date: Tue, 1 Oct 2024 16:09:04 +0200 Subject: [PATCH 1/3] fix: remove denomination usuelle from nom complet in case it has bad data --- app/service/formatters/nom_complet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/service/formatters/nom_complet.py b/app/service/formatters/nom_complet.py index 57a49812..6aa806e4 100644 --- a/app/service/formatters/nom_complet.py +++ b/app/service/formatters/nom_complet.py @@ -20,7 +20,7 @@ def format_nom_complet( else: denomination = " ".join( filter( - None, + lambda x: x and x.upper() != "SUPPRESSION DU NOM COMMERCIAL", [ denomination_usuelle_1, denomination_usuelle_2, From f94836a7d53eec43cd3ebc880dc1cf01b2941396 Mon Sep 17 00:00:00 2001 From: HAEKADI Date: Tue, 1 Oct 2024 16:23:21 +0200 Subject: [PATCH 2/3] tests(fix): update qualiopi test --- app/tests/e2e_tests/test_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/tests/e2e_tests/test_api.py b/app/tests/e2e_tests/test_api.py index f9dd2431..2de4cbdd 100755 --- a/app/tests/e2e_tests/test_api.py +++ b/app/tests/e2e_tests/test_api.py @@ -133,7 +133,7 @@ def test_organisme_formation(api_response_tester): api_response_tester.test_max_number_of_results(path, 0) path = "search?q=196716856" api_response_tester.test_field_value(path, 0, "complements.est_qualiopi", True) - path = "search?q=788945368" + path = "search?q=552120222" api_response_tester.test_field_value(path, 0, "complements.est_qualiopi", False) api_response_tester.test_field_value( path, 0, "complements.est_organisme_formation", True From 15c155dce13475caedf22dd286b3a38d4e4a02be Mon Sep 17 00:00:00 2001 From: HAEKADI Date: Tue, 1 Oct 2024 16:30:43 +0200 Subject: [PATCH 3/3] tests(fix): update qualiopi test --- app/tests/e2e_tests/test_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/tests/e2e_tests/test_api.py b/app/tests/e2e_tests/test_api.py index 2de4cbdd..178eb902 100755 --- a/app/tests/e2e_tests/test_api.py +++ b/app/tests/e2e_tests/test_api.py @@ -435,7 +435,7 @@ def test_est_organisme_formation(api_response_tester): api_response_tester.test_max_number_of_results(path, 0) path = "search?q=196716856" api_response_tester.test_field_value(path, 0, "complements.est_qualiopi", True) - path = "search?q=788945368" + path = "search?q=552120222" api_response_tester.test_field_value(path, 0, "complements.est_qualiopi", False) api_response_tester.test_field_value( path, 0, "complements.est_organisme_formation", True