Skip to content

Commit

Permalink
[FIX]Remove denomination usuelle from nom complet in case of error
Browse files Browse the repository at this point in the history
Merge pull request #422 from annuaire-entreprises-data-gouv-fr/fix-nom-commercial
  • Loading branch information
HAEKADI authored Oct 1, 2024
2 parents a778453 + 15c155d commit 0721fdd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/service/formatters/nom_complet.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions app/tests/e2e_tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 0721fdd

Please sign in to comment.