Skip to content

Commit

Permalink
fix(Diagnostic): N'accepte pas les valeurs moins de 0 (#4766)
Browse files Browse the repository at this point in the history
Co-authored-by: Raphael Odini <raphodn@users.noreply.github.com>
  • Loading branch information
hfroot and raphodn authored Dec 12, 2024
1 parent 9d25df1 commit 8fc78ec
Show file tree
Hide file tree
Showing 8 changed files with 3,560 additions and 694 deletions.
1 change: 1 addition & 0 deletions api/tests/files/diagnostics_bad_file.csv
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@
25089405025275,Small fish total vs egalim,45096,,42126486200010,700,14000,,site,conceded,public,,2020,1000,500,100.10,0,0,0,0,0,50,100
25089405025275,Small egalim total,45096,,42126486200010,700,14000,,site,conceded,public,,2021,1000,50,50,50,50,200,200,200,100,100
ValléeViolette,Alphabetical SIRET,45096,,42126486200010,700,14000,,site,conceded,public,,2019,2000,100,200,0,0,0,0,0,0,0
25089405025275,Negative value,45096,,,700,14000,,site,conceded,public,,2021,1000,-10,50,,,,,,,
4 changes: 4 additions & 0 deletions api/tests/test_import_diagnostics.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,10 @@ def test_error_collection(self, _):
errors.pop(0)["message"],
"Champ 'siret' : Le SIRET doit être composé des chiffres",
)
self.assertEqual(
errors.pop(0)["message"],
"Champ 'Bio - Valeur annuelle HT' : Assurez-vous que cette valeur est supérieure ou égale à 0.",
)

@authenticate
def test_staff_error_collection(self, _):
Expand Down
Loading

0 comments on commit 8fc78ec

Please sign in to comment.