Inactive user cannot receive password reset email.
(self)
| 1305 | self.assertEqual(user.email, "tesT") |
| 1306 | |
| 1307 | def test_inactive_user(self): |
| 1308 | """ |
| 1309 | Inactive user cannot receive password reset email. |
| 1310 | """ |
| 1311 | user, username, email = self.create_dummy_user() |
| 1312 | user.is_active = False |
| 1313 | user.save() |
| 1314 | form = PasswordResetForm({"email": email}) |
| 1315 | self.assertTrue(form.is_valid()) |
| 1316 | form.save() |
| 1317 | self.assertEqual(len(mail.outbox), 0) |
| 1318 | |
| 1319 | def test_unusable_password(self): |
| 1320 | user = User.objects.create_user("testuser", "test@example.com", "test") |
nothing calls this directly
no test coverage detected