mirror of
https://github.com/django/django.git
synced 2025-10-31 09:41:08 +00:00
[1.9.x] Fixed #25596 -- Fixed regression in password change view with custom user model.
The reverse() added in50aa1a790ccrashed on a custom user model. Backport of5acf203db2from master
This commit is contained in:
@@ -420,7 +420,7 @@ class CustomUserPasswordResetTest(AuthViewsTestCase):
|
||||
self.assertRedirects(response, '/reset/done/')
|
||||
|
||||
|
||||
@override_settings(AUTH_USER_MODEL='auth.UUIDUser')
|
||||
@override_settings(AUTH_USER_MODEL='auth_tests.UUIDUser')
|
||||
class UUIDUserPasswordResetTest(CustomUserPasswordResetTest):
|
||||
|
||||
def _test_confirm_start(self):
|
||||
@@ -1005,7 +1005,7 @@ class ChangelistTests(AuthViewsTestCase):
|
||||
|
||||
|
||||
@override_settings(
|
||||
AUTH_USER_MODEL='auth.UUIDUser',
|
||||
AUTH_USER_MODEL='auth_tests.UUIDUser',
|
||||
ROOT_URLCONF='auth_tests.urls_custom_user_admin',
|
||||
)
|
||||
class UUIDUserTests(TestCase):
|
||||
@@ -1014,7 +1014,7 @@ class UUIDUserTests(TestCase):
|
||||
u = UUIDUser.objects.create_superuser(username='uuid', email='foo@bar.com', password='test')
|
||||
self.assertTrue(self.client.login(username='uuid', password='test'))
|
||||
|
||||
user_change_url = reverse('custom_user_admin:auth_uuiduser_change', args=(u.pk,))
|
||||
user_change_url = reverse('custom_user_admin:auth_tests_uuiduser_change', args=(u.pk,))
|
||||
response = self.client.get(user_change_url)
|
||||
self.assertEqual(response.status_code, 200)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user