Skip to content

Commit

Permalink
temporary commit: corrections, second pass
Browse files Browse the repository at this point in the history
  • Loading branch information
EwenKorr committed Sep 24, 2024
1 parent 9021a54 commit 2d17540
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion itou/users/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ class JobSeekerProfile(models.Model):
)
ERROR_JOBSEEKER_INCONSISTENT_NIR_BIRTHDATE = (
"La date de naissance ne correspond pas au numéro de sécurité sociale "
"(dont le format est 1AAMMDDXXXYYYCC, où AA est l’année de naissance "
"(dont le format est SAAMMDDXXXYYYCC, où AA est l’année de naissance "
"et MM le mois de naissance)."
)

Expand Down
4 changes: 2 additions & 2 deletions tests/www/dashboard/test_edit_job_seeker_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def test_edit_by_company_with_lack_of_nir_reason(self, _mock):
self.assertNotContains(response, self.NIR_UPDATE_TALLY_LINK_LABEL, html=True)
self.assertContains(response, "Pour ajouter le numéro de sécurité sociale, veuillez décocher la case")

NEW_NIR = "178122978200508"
NEW_NIR = "1 781 22978200508"
post_data = {
"email": "[email protected]",
"title": "M",
Expand Down Expand Up @@ -257,7 +257,7 @@ def test_edit_by_company_without_nir_information(self, _mock):
"Le numéro de sécurité sociale est trop court (15 caractères autorisés).",
)

NEW_NIR = "178122978200508"
NEW_NIR = "1 781 22978200508"
post_data["nir"] = NEW_NIR
response = self.client.post(url, data=post_data)
self.assertRedirects(response, expected_url=back_url)
Expand Down
9 changes: 2 additions & 7 deletions tests/www/dashboard/test_edit_user_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ class EditUserInfoViewTest(InclusionConnectBaseTestCase):
LACK_OF_NIR_FIELD_ID = "id_lack_of_nir"
LACK_OF_NIR_REASON_FIELD_ID = "id_lack_of_nir_reason"
BIRTHDATE_FIELD_NAME = "birthdate"
ERROR_INCONSISTENT_NIR = (
"Une incohérence a été détectée parmi les informations suivantes : "
"la civilité, le numéro de sécurité sociale et la date de naissance. "
"Veuillez corriger celle(s) en erreur pour continuer."
)

def setUp(self):
super().setUp()
Expand Down Expand Up @@ -322,7 +317,7 @@ def test_edit_with_lack_of_nir_reason(self, _mock):
self.assertNotContains(response, self.NIR_UPDATE_TALLY_LINK_LABEL, html=True)
self.assertContains(response, "Pour ajouter le numéro de sécurité sociale, veuillez décocher la case")

NEW_NIR = "178122978200508"
NEW_NIR = "1 781 22978200508"
post_data = {
"email": "[email protected]",
"title": "M",
Expand Down Expand Up @@ -354,7 +349,7 @@ def test_edit_without_nir_information(self):
assert not response.context["form"]["nir"].field.disabled
self.assertNotContains(response, self.NIR_UPDATE_TALLY_LINK_LABEL, html=True)

NEW_NIR = "178122978200508"
NEW_NIR = "1 781 22978200508"
post_data = {
"email": "[email protected]",
"title": "M",
Expand Down

0 comments on commit 2d17540

Please sign in to comment.