diff --git a/tests/auth_tests/test_views.py b/tests/auth_tests/test_views.py
index ec99115..c5a5b58 100644
a
|
b
|
from django.utils.http import urlquote
|
30 | 30 | from django.utils.six.moves.urllib.parse import ParseResult, urlparse |
31 | 31 | from django.utils.translation import LANGUAGE_SESSION_KEY |
32 | 32 | |
| 33 | from .models import UUIDUser |
33 | 34 | from .settings import AUTH_TEMPLATES |
34 | 35 | |
35 | 36 | |
… |
… |
class PasswordResetTest(AuthViewsTestCase):
|
329 | 330 | self.assertContains(response, "Hello, .") |
330 | 331 | |
331 | 332 | |
332 | | @override_settings(AUTH_USER_MODEL='auth.CustomUser') |
| 333 | @override_settings(AUTH_USER_MODEL='auth.UUIDUser') |
333 | 334 | class CustomUserPasswordResetTest(AuthViewsTestCase): |
334 | | fixtures = ['custom_user.json'] |
335 | 335 | |
336 | 336 | def _test_confirm_start(self): |
337 | | # Start by creating the email |
| 337 | u = UUIDUser.objects.create_user( |
| 338 | username='foo', |
| 339 | email='staffmember@example.com', |
| 340 | password='foo', |
| 341 | ) |
338 | 342 | response = self.client.post('/password_reset/', {'email': 'staffmember@example.com'}) |
339 | 343 | self.assertEqual(response.status_code, 302) |
340 | 344 | self.assertEqual(len(mail.outbox), 1) |
… |
… |
class CustomUserPasswordResetTest(AuthViewsTestCase):
|
351 | 355 | # redirect to a 'complete' page: |
352 | 356 | self.assertContains(response, "Please enter your new password") |
353 | 357 | |
| 358 | response = self.client.post(path, { |
| 359 | 'new_password1': 'anewpassword', |
| 360 | 'new_password2': 'anewpassword', |
| 361 | }) |
| 362 | self.assertRedirects(response, '/reset/done/') |
| 363 | |
354 | 364 | |
355 | 365 | class ChangePasswordTest(AuthViewsTestCase): |
356 | 366 | |