Updated unit test

This commit is contained in:
Antoine Nguyen
2023-04-18 15:31:48 +02:00
parent 1a2bf048f4
commit 55db7b2ceb
2 changed files with 15 additions and 4 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ class ProfileForm(forms.ModelForm):
widget=forms.PasswordInput(attrs={"class": "form-control"})
)
class Meta(object):
class Meta:
model = User
fields = ("first_name", "last_name", "language",
"phone_number", "secondary_email")
+14 -3
View File
@@ -148,15 +148,26 @@ class ProfileTestCase(ModoTestCase):
self.ajax_post(
reverse("core:user_profile"),
{"oldpassword": "toto",
{"language": "en",
"oldpassword": "toto",
"confirmation": "tutu"},
status=400
)
self.ajax_post(
reverse("core:user_profile"),
{"oldpassword": "toto",
"newpassword": "tutu", "confirmation": "tutu"},
{"language": "en",
"oldpassword": "toto",
"newpassword": "tutu"},
status=400
)
self.ajax_post(
reverse("core:user_profile"),
{"language": "en",
"oldpassword": "toto",
"newpassword": "tutu",
"confirmation": "tutu"},
status=400
)