summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/admin_views/tests.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/admin_views/tests.py b/tests/admin_views/tests.py
index cbd545a663..f8f3b3c269 100644
--- a/tests/admin_views/tests.py
+++ b/tests/admin_views/tests.py
@@ -4755,9 +4755,18 @@ class UserAdminTest(TestCase):
'_continue': '1',
})
new_user = User.objects.get(username='newuser')
- self.assertRedirects(response, reverse('admin:auth_user_change', args=(new_user.pk,)))
+ new_user_url = reverse('admin:auth_user_change', args=(new_user.pk,))
+ self.assertRedirects(response, new_user_url, fetch_redirect_response=False)
self.assertEqual(User.objects.count(), user_count + 1)
self.assertTrue(new_user.has_usable_password())
+ response = self.client.get(new_user_url)
+ self.assertContains(
+ response,
+ '<li class="success">The user "<a href="%s">'
+ '%s</a>" was added successfully. You may edit it again below.</li>'
+ % (new_user_url, new_user),
+ html=True,
+ )
def test_password_mismatch(self):
response = self.client.post(reverse('admin:auth_user_add'), {