(self)
| 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 | """ |
nothing calls this directly
no test coverage detected