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

@ -6,13 +6,13 @@ from django.core.handlers.wsgi import WSGIHandler, WSGIRequest, get_script_name
from django.core.signals import request_finished, request_started
from django.db import close_old_connections, connection
from django.test import (
RequestFactory, TestCase, TransactionTestCase, override_settings,
RequestFactory, SimpleTestCase, TransactionTestCase, override_settings,
)
from django.utils import six
from django.utils.encoding import force_str
class HandlerTests(TestCase):
class HandlerTests(SimpleTestCase):
def setUp(self):
request_started.disconnect(close_old_connections)
@ -137,7 +137,7 @@ class TransactionsPerRequestTests(TransactionTestCase):
@override_settings(ROOT_URLCONF='handlers.urls')
class SignalsTests(TestCase):
class SignalsTests(SimpleTestCase):
def setUp(self):
self.signals = []
@ -170,7 +170,7 @@ class SignalsTests(TestCase):
@override_settings(ROOT_URLCONF='handlers.urls')
class HandlerSuspiciousOpsTest(TestCase):
class HandlerSuspiciousOpsTest(SimpleTestCase):
def test_suspiciousop_in_view_returns_400(self):
response = self.client.get('/suspicious/')
@ -178,7 +178,7 @@ class HandlerSuspiciousOpsTest(TestCase):
@override_settings(ROOT_URLCONF='handlers.urls')
class HandlerNotFoundTest(TestCase):
class HandlerNotFoundTest(SimpleTestCase):
def test_invalid_urls(self):
response = self.client.get('~%A9helloworld')
@ -202,7 +202,7 @@ class HandlerNotFoundTest(TestCase):
self.assertIsInstance(environ['PATH_INFO'], six.text_type)
class ScriptNameTests(TestCase):
class ScriptNameTests(SimpleTestCase):
def test_get_script_name(self):
# Regression test for #23173
# Test first without PATH_INFO