summaryrefslogtreecommitdiff
path: root/tests/admin_docs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/admin_docs')
-rw-r--r--tests/admin_docs/tests.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/admin_docs/tests.py b/tests/admin_docs/tests.py
index c410eff020..6234834955 100644
--- a/tests/admin_docs/tests.py
+++ b/tests/admin_docs/tests.py
@@ -130,38 +130,38 @@ class XViewMiddlewareTest(AdminDocsTestCase):
def test_xview_func(self):
user = User.objects.get(username='super')
response = self.client.head('/xview/func/')
- self.assertFalse('X-View' in response)
+ self.assertNotIn('X-View', response)
self.client.login(username='super', password='secret')
response = self.client.head('/xview/func/')
- self.assertTrue('X-View' in response)
+ self.assertIn('X-View', response)
self.assertEqual(response['X-View'], 'admin_docs.views.xview')
user.is_staff = False
user.save()
response = self.client.head('/xview/func/')
- self.assertFalse('X-View' in response)
+ self.assertNotIn('X-View', response)
user.is_staff = True
user.is_active = False
user.save()
response = self.client.head('/xview/func/')
- self.assertFalse('X-View' in response)
+ self.assertNotIn('X-View', response)
def test_xview_class(self):
user = User.objects.get(username='super')
response = self.client.head('/xview/class/')
- self.assertFalse('X-View' in response)
+ self.assertNotIn('X-View', response)
self.client.login(username='super', password='secret')
response = self.client.head('/xview/class/')
- self.assertTrue('X-View' in response)
+ self.assertIn('X-View', response)
self.assertEqual(response['X-View'], 'admin_docs.views.XViewClass')
user.is_staff = False
user.save()
response = self.client.head('/xview/class/')
- self.assertFalse('X-View' in response)
+ self.assertNotIn('X-View', response)
user.is_staff = True
user.is_active = False
user.save()
response = self.client.head('/xview/class/')
- self.assertFalse('X-View' in response)
+ self.assertNotIn('X-View', response)
@unittest.skipUnless(utils.docutils_is_available, "no docutils installed.")