diff --git a/tests/admin_inlines/tests.py b/tests/admin_inlines/tests.py
index 119dd56e61..e0d87ead44 100644
--- a/tests/admin_inlines/tests.py
+++ b/tests/admin_inlines/tests.py
@@ -154,7 +154,6 @@ class TestInline(TestDataMixin, TestCase):
# Identically named callable isn't present in the parent ModelAdmin,
# rendering of the add view shouldn't explode
response = self.client.get(reverse('admin:admin_inlines_novel_add'))
- self.assertEqual(response.status_code, 200)
# View should have the child inlines section
self.assertContains(
response,
@@ -164,7 +163,6 @@ class TestInline(TestDataMixin, TestCase):
def test_callable_lookup(self):
"""Admin inline should invoke local callable when its name is listed in readonly_fields"""
response = self.client.get(reverse('admin:admin_inlines_poll_add'))
- self.assertEqual(response.status_code, 200)
# Add parent object view should have the child inlines section
self.assertContains(
response,
diff --git a/tests/admin_views/test_actions.py b/tests/admin_views/test_actions.py
index a98b80a1cb..445e437fc2 100644
--- a/tests/admin_views/test_actions.py
+++ b/tests/admin_views/test_actions.py
@@ -135,9 +135,8 @@ class AdminActionsTest(TestCase):
'index': '0',
}
response = self.client.post(reverse('admin:admin_views_unchangeableobject_changelist'), action_data)
- # No 500 caused by NoReverseMatch
- self.assertEqual(response.status_code, 200)
- # The page doesn't display a link to the nonexistent change page.
+ # No 500 caused by NoReverseMatch. The page doesn't display a link to
+ # the nonexistent change page.
self.assertContains(response, '
Unchangeable object: %s
' % obj, 1, html=True)
def test_delete_queryset_hook(self):
diff --git a/tests/admin_views/tests.py b/tests/admin_views/tests.py
index a07abf273f..c958a9c955 100644
--- a/tests/admin_views/tests.py
+++ b/tests/admin_views/tests.py
@@ -578,7 +578,6 @@ class AdminViewBasicTest(AdminViewBasicTestCase):
model.objects.create(stuff='The First Item', order=1)
model.objects.create(stuff='The Middle Item', order=2)
response = self.client.get(reverse('admin:admin_views_%s_changelist' % url), {})
- self.assertEqual(response.status_code, 200)
# Should have 3 columns including action checkbox col.
self.assertContains(response, '
%s
' % o, html=True)
@@ -989,7 +987,6 @@ class AdminViewBasicTest(AdminViewBasicTestCase):
q = Question.objects.create(question='Why?', expires=date)
Answer2.objects.create(question=q, answer='Because.')
response = self.client.get(reverse('admin:admin_views_answer2_changelist'))
- self.assertEqual(response.status_code, 200)
self.assertContains(response, 'question__expires__day=16')
self.assertContains(response, 'question__expires__month=10')
self.assertContains(response, 'question__expires__year=2016')
@@ -1001,7 +998,6 @@ class AdminViewBasicTest(AdminViewBasicTestCase):
q = Question.objects.create(question='Why?', expires=date)
Answer2.objects.create(question=q, answer='Because.')
response = self.client.get(reverse('admin:admin_views_answer2_changelist'))
- self.assertEqual(response.status_code, 200)
self.assertContains(response, 'question__expires__day=31')
self.assertContains(response, 'question__expires__month=12')
self.assertContains(response, 'question__expires__year=2016')
@@ -1413,7 +1409,6 @@ class CustomModelAdminTest(AdminViewBasicTestCase):
'password': 'secret',
}, follow=True)
self.assertIsInstance(login, TemplateResponse)
- self.assertEqual(login.status_code, 200)
self.assertContains(login, 'custom form error')
self.assertContains(login, 'path/to/media.css')
@@ -1652,7 +1647,6 @@ class AdminViewPermissionsTest(TestCase):
response = self.client.get(self.index_url)
self.assertEqual(response.status_code, 302)
login = self.client.post(login_url, self.joepublic_login)
- self.assertEqual(login.status_code, 200)
self.assertContains(login, ERROR_MESSAGE)
# Requests without username should not return 500 errors.
@@ -1676,7 +1670,6 @@ class AdminViewPermissionsTest(TestCase):
response = self.client.get(reverse('has_permission_admin:index'))
self.assertEqual(response.status_code, 302)
login = self.client.post(reverse('has_permission_admin:login'), self.joepublic_login)
- self.assertEqual(login.status_code, 200)
self.assertContains(login, 'permission denied')
# User with permissions should be able to login.
@@ -1726,7 +1719,6 @@ class AdminViewPermissionsTest(TestCase):
# Logging in with non-admin user fails
login = self.client.post(login_url, self.joepublic_login)
- self.assertEqual(login.status_code, 200)
self.assertContains(login, ERROR_MESSAGE)
# Establish a valid admin session
@@ -1890,18 +1882,18 @@ class AdminViewPermissionsTest(TestCase):
# view user can view articles but not make changes.
self.client.force_login(self.viewuser)
response = self.client.get(article_changelist_url)
- self.assertEqual(response.context['title'], 'Select article to view')
self.assertContains(
response,
'Select article to view | Django site admin',
)
self.assertContains(response, '