1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Refs #24652 -- Used SimpleTestCase where appropriate.

This commit is contained in:
Simon Charette
2015-04-17 17:38:20 -04:00
parent e2b77acedd
commit be67400b47
93 changed files with 362 additions and 340 deletions

View File

@@ -1,10 +1,10 @@
from django.conf import settings
from django.core.checks.security import base, csrf, sessions
from django.test import TestCase
from django.test import SimpleTestCase
from django.test.utils import override_settings
class CheckSessionCookieSecureTest(TestCase):
class CheckSessionCookieSecureTest(SimpleTestCase):
@property
def func(self):
from django.core.checks.security.sessions import check_session_cookie_secure
@@ -55,7 +55,7 @@ class CheckSessionCookieSecureTest(TestCase):
self.assertEqual(self.func(None), [])
class CheckSessionCookieHttpOnlyTest(TestCase):
class CheckSessionCookieHttpOnlyTest(SimpleTestCase):
@property
def func(self):
from django.core.checks.security.sessions import check_session_cookie_httponly
@@ -106,7 +106,7 @@ class CheckSessionCookieHttpOnlyTest(TestCase):
self.assertEqual(self.func(None), [])
class CheckCSRFMiddlewareTest(TestCase):
class CheckCSRFMiddlewareTest(SimpleTestCase):
@property
def func(self):
from django.core.checks.security.csrf import check_csrf_middleware
@@ -125,7 +125,7 @@ class CheckCSRFMiddlewareTest(TestCase):
self.assertEqual(self.func(None), [])
class CheckCSRFCookieSecureTest(TestCase):
class CheckCSRFCookieSecureTest(SimpleTestCase):
@property
def func(self):
from django.core.checks.security.csrf import check_csrf_cookie_secure
@@ -156,7 +156,7 @@ class CheckCSRFCookieSecureTest(TestCase):
self.assertEqual(self.func(None), [])
class CheckCSRFCookieHttpOnlyTest(TestCase):
class CheckCSRFCookieHttpOnlyTest(SimpleTestCase):
@property
def func(self):
from django.core.checks.security.csrf import check_csrf_cookie_httponly
@@ -187,7 +187,7 @@ class CheckCSRFCookieHttpOnlyTest(TestCase):
self.assertEqual(self.func(None), [])
class CheckSecurityMiddlewareTest(TestCase):
class CheckSecurityMiddlewareTest(SimpleTestCase):
@property
def func(self):
from django.core.checks.security.base import check_security_middleware
@@ -206,7 +206,7 @@ class CheckSecurityMiddlewareTest(TestCase):
self.assertEqual(self.func(None), [])
class CheckStrictTransportSecurityTest(TestCase):
class CheckStrictTransportSecurityTest(SimpleTestCase):
@property
def func(self):
from django.core.checks.security.base import check_sts
@@ -238,7 +238,7 @@ class CheckStrictTransportSecurityTest(TestCase):
self.assertEqual(self.func(None), [])
class CheckStrictTransportSecuritySubdomainsTest(TestCase):
class CheckStrictTransportSecuritySubdomainsTest(SimpleTestCase):
@property
def func(self):
from django.core.checks.security.base import check_sts_include_subdomains
@@ -282,7 +282,7 @@ class CheckStrictTransportSecuritySubdomainsTest(TestCase):
self.assertEqual(self.func(None), [])
class CheckXFrameOptionsMiddlewareTest(TestCase):
class CheckXFrameOptionsMiddlewareTest(SimpleTestCase):
@property
def func(self):
from django.core.checks.security.base import check_xframe_options_middleware
@@ -300,7 +300,7 @@ class CheckXFrameOptionsMiddlewareTest(TestCase):
self.assertEqual(self.func(None), [])
class CheckXFrameOptionsDenyTest(TestCase):
class CheckXFrameOptionsDenyTest(SimpleTestCase):
@property
def func(self):
from django.core.checks.security.base import check_xframe_deny
@@ -333,7 +333,7 @@ class CheckXFrameOptionsDenyTest(TestCase):
self.assertEqual(self.func(None), [])
class CheckContentTypeNosniffTest(TestCase):
class CheckContentTypeNosniffTest(SimpleTestCase):
@property
def func(self):
from django.core.checks.security.base import check_content_type_nosniff
@@ -365,7 +365,7 @@ class CheckContentTypeNosniffTest(TestCase):
self.assertEqual(self.func(None), [])
class CheckXssFilterTest(TestCase):
class CheckXssFilterTest(SimpleTestCase):
@property
def func(self):
from django.core.checks.security.base import check_xss_filter
@@ -397,7 +397,7 @@ class CheckXssFilterTest(TestCase):
self.assertEqual(self.func(None), [])
class CheckSSLRedirectTest(TestCase):
class CheckSSLRedirectTest(SimpleTestCase):
@property
def func(self):
from django.core.checks.security.base import check_ssl_redirect
@@ -429,7 +429,7 @@ class CheckSSLRedirectTest(TestCase):
self.assertEqual(self.func(None), [])
class CheckSecretKeyTest(TestCase):
class CheckSecretKeyTest(SimpleTestCase):
@property
def func(self):
from django.core.checks.security.base import check_secret_key
@@ -466,7 +466,7 @@ class CheckSecretKeyTest(TestCase):
self.assertEqual(self.func(None), [base.W009])
class CheckDebugTest(TestCase):
class CheckDebugTest(SimpleTestCase):
@property
def func(self):
from django.core.checks.security.base import check_debug