summaryrefslogtreecommitdiff
path: root/tests/middleware/tests.py
diff options
context:
space:
mode:
authorSimon Charette <charette.s@gmail.com>2015-04-17 17:38:20 -0400
committerSimon Charette <charette.s@gmail.com>2015-05-20 13:46:13 -0400
commitbe67400b477c1b0e7e81766f41bbceed0de74bdc (patch)
treefd8e6d087082754df9159a5549bfa80e2a8c57d9 /tests/middleware/tests.py
parente2b77aceddbda9071fcfc38f90fb50d091d0b5fc (diff)
downloaddjango-be67400b477c1b0e7e81766f41bbceed0de74bdc.tar.gz
Refs #24652 -- Used SimpleTestCase where appropriate.
Diffstat (limited to 'tests/middleware/tests.py')
-rw-r--r--tests/middleware/tests.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/middleware/tests.py b/tests/middleware/tests.py
index 8b20a0c627..db9de1e9b4 100644
--- a/tests/middleware/tests.py
+++ b/tests/middleware/tests.py
@@ -19,7 +19,7 @@ from django.middleware.common import (
)
from django.middleware.gzip import GZipMiddleware
from django.middleware.http import ConditionalGetMiddleware
-from django.test import RequestFactory, TestCase, override_settings
+from django.test import RequestFactory, SimpleTestCase, override_settings
from django.test.utils import patch_logger
from django.utils import six
from django.utils.encoding import force_str
@@ -28,7 +28,7 @@ from django.utils.six.moves.urllib.parse import quote
@override_settings(ROOT_URLCONF='middleware.urls')
-class CommonMiddlewareTest(TestCase):
+class CommonMiddlewareTest(SimpleTestCase):
rf = RequestFactory()
@@ -289,7 +289,7 @@ class CommonMiddlewareTest(TestCase):
IGNORABLE_404_URLS=[re.compile(r'foo')],
MANAGERS=['PHB@dilbert.com'],
)
-class BrokenLinkEmailsMiddlewareTest(TestCase):
+class BrokenLinkEmailsMiddlewareTest(SimpleTestCase):
rf = RequestFactory()
@@ -353,7 +353,7 @@ class BrokenLinkEmailsMiddlewareTest(TestCase):
@override_settings(ROOT_URLCONF='middleware.cond_get_urls')
-class ConditionalGetMiddlewareTest(TestCase):
+class ConditionalGetMiddlewareTest(SimpleTestCase):
def setUp(self):
self.req = RequestFactory().get('/')
@@ -492,7 +492,7 @@ class ConditionalGetMiddlewareTest(TestCase):
self.assertEqual(self.resp.status_code, 400)
-class XFrameOptionsMiddlewareTest(TestCase):
+class XFrameOptionsMiddlewareTest(SimpleTestCase):
"""
Tests for the X-Frame-Options clickjacking prevention middleware.
"""
@@ -610,7 +610,7 @@ class XFrameOptionsMiddlewareTest(TestCase):
self.assertEqual(r['X-Frame-Options'], 'DENY')
-class GZipMiddlewareTest(TestCase):
+class GZipMiddlewareTest(SimpleTestCase):
"""
Tests the GZip middleware.
"""
@@ -717,7 +717,7 @@ class GZipMiddlewareTest(TestCase):
@override_settings(USE_ETAGS=True)
-class ETagGZipMiddlewareTest(TestCase):
+class ETagGZipMiddlewareTest(SimpleTestCase):
"""
Tests if the ETag middleware behaves correctly with GZip middleware.
"""