MCPcopy
hub / github.com/django/django / test_password_mismatch

Method test_password_mismatch

tests/admin_views/tests.py:8094–8109  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

8092 )
8093
8094 def test_password_mismatch(self):
8095 response = self.client.post(
8096 reverse("admin:auth_user_add"),
8097 {
8098 "username": "newuser",
8099 "password1": "newpassword",
8100 "password2": "mismatch",
8101 },
8102 )
8103 self.assertEqual(response.status_code, 200)
8104 self.assertFormError(response.context["adminform"], "password1", [])
8105 self.assertFormError(
8106 response.context["adminform"],
8107 "password2",
8108 ["The two password fields didn’t match."],
8109 )
8110
8111 def test_user_fk_add_popup(self):
8112 """

Callers

nothing calls this directly

Calls 3

reverseFunction · 0.90
postMethod · 0.45
assertFormErrorMethod · 0.45

Tested by

no test coverage detected