diff options
| author | Simon Charette <charette.s@gmail.com> | 2015-04-17 17:38:20 -0400 |
|---|---|---|
| committer | Simon Charette <charette.s@gmail.com> | 2015-05-20 13:46:13 -0400 |
| commit | be67400b477c1b0e7e81766f41bbceed0de74bdc (patch) | |
| tree | fd8e6d087082754df9159a5549bfa80e2a8c57d9 /tests/view_tests | |
| parent | e2b77aceddbda9071fcfc38f90fb50d091d0b5fc (diff) | |
Refs #24652 -- Used SimpleTestCase where appropriate.
Diffstat (limited to 'tests/view_tests')
| -rw-r--r-- | tests/view_tests/tests/test_csrf.py | 4 | ||||
| -rw-r--r-- | tests/view_tests/tests/test_debug.py | 16 | ||||
| -rw-r--r-- | tests/view_tests/tests/test_i18n.py | 7 | ||||
| -rw-r--r-- | tests/view_tests/tests/test_json.py | 4 | ||||
| -rw-r--r-- | tests/view_tests/tests/test_specials.py | 4 |
5 files changed, 18 insertions, 17 deletions
diff --git a/tests/view_tests/tests/test_csrf.py b/tests/view_tests/tests/test_csrf.py index 9baee9ce34..ff30becc11 100644 --- a/tests/view_tests/tests/test_csrf.py +++ b/tests/view_tests/tests/test_csrf.py @@ -1,9 +1,9 @@ -from django.test import Client, TestCase, override_settings +from django.test import Client, SimpleTestCase, override_settings from django.utils.translation import override @override_settings(ROOT_URLCONF="view_tests.urls") -class CsrfViewTests(TestCase): +class CsrfViewTests(SimpleTestCase): def setUp(self): super(CsrfViewTests, self).setUp() diff --git a/tests/view_tests/tests/test_debug.py b/tests/view_tests/tests/test_debug.py index a98b776f78..ac8cbcdb11 100644 --- a/tests/view_tests/tests/test_debug.py +++ b/tests/view_tests/tests/test_debug.py @@ -15,7 +15,7 @@ from django.core import mail from django.core.files.uploadedfile import SimpleUploadedFile from django.core.urlresolvers import reverse from django.template import TemplateDoesNotExist -from django.test import RequestFactory, TestCase, override_settings +from django.test import RequestFactory, SimpleTestCase, override_settings from django.test.utils import LoggingCaptureMixin from django.utils import six from django.utils.encoding import force_bytes, force_text @@ -33,7 +33,7 @@ if six.PY3: from .py3_test_debug import Py3ExceptionReporterTests # NOQA -class CallableSettingWrapperTests(TestCase): +class CallableSettingWrapperTests(SimpleTestCase): """ Unittests for CallableSettingWrapper """ def test_repr(self): @@ -49,7 +49,7 @@ class CallableSettingWrapperTests(TestCase): @override_settings(DEBUG=True, ROOT_URLCONF="view_tests.urls") -class DebugViewTests(LoggingCaptureMixin, TestCase): +class DebugViewTests(LoggingCaptureMixin, SimpleTestCase): def test_files(self): response = self.client.get('/raises/') @@ -202,7 +202,7 @@ class DebugViewTests(LoggingCaptureMixin, TestCase): 'BACKEND': 'django.template.backends.dummy.TemplateStrings', }], ) -class NonDjangoTemplatesDebugViewTests(TestCase): +class NonDjangoTemplatesDebugViewTests(SimpleTestCase): def test_400(self): # Ensure that when DEBUG=True, technical_500_template() is called. @@ -224,7 +224,7 @@ class NonDjangoTemplatesDebugViewTests(TestCase): self.assertContains(response, '<div class="context" id="', status_code=500) -class ExceptionReporterTests(TestCase): +class ExceptionReporterTests(SimpleTestCase): rf = RequestFactory() def test_request_and_exception(self): @@ -417,7 +417,7 @@ class ExceptionReporterTests(TestCase): ) -class PlainTextReportTests(TestCase): +class PlainTextReportTests(SimpleTestCase): rf = RequestFactory() def test_request_and_exception(self): @@ -644,7 +644,7 @@ class ExceptionReportTestMixin(object): @override_settings(ROOT_URLCONF='view_tests.urls') -class ExceptionReporterFilterTests(ExceptionReportTestMixin, LoggingCaptureMixin, TestCase): +class ExceptionReporterFilterTests(ExceptionReportTestMixin, LoggingCaptureMixin, SimpleTestCase): """ Ensure that sensitive information can be filtered out of error reports. Refs #14614. @@ -835,7 +835,7 @@ class ExceptionReporterFilterTests(ExceptionReportTestMixin, LoggingCaptureMixin self.assertNotContains(response, 'should not be displayed', status_code=500) -class AjaxResponseExceptionReporterFilter(ExceptionReportTestMixin, LoggingCaptureMixin, TestCase): +class AjaxResponseExceptionReporterFilter(ExceptionReportTestMixin, LoggingCaptureMixin, SimpleTestCase): """ Ensure that sensitive information can be filtered out of error reports. diff --git a/tests/view_tests/tests/test_i18n.py b/tests/view_tests/tests/test_i18n.py index 04643d0508..886c10f5fc 100644 --- a/tests/view_tests/tests/test_i18n.py +++ b/tests/view_tests/tests/test_i18n.py @@ -10,7 +10,8 @@ from os import path from django.conf import settings from django.core.urlresolvers import reverse from django.test import ( - LiveServerTestCase, TestCase, modify_settings, override_settings, + LiveServerTestCase, SimpleTestCase, TestCase, modify_settings, + override_settings, ) from django.utils import six from django.utils._os import upath @@ -106,7 +107,7 @@ class I18NTests(TestCase): @override_settings(ROOT_URLCONF='view_tests.urls') -class JsI18NTests(TestCase): +class JsI18NTests(SimpleTestCase): """ Tests django views in django/views/i18n.py that need to change settings.LANGUAGE_CODE. @@ -184,7 +185,7 @@ class JsI18NTests(TestCase): @override_settings(ROOT_URLCONF='view_tests.urls') -class JsI18NTestsMultiPackage(TestCase): +class JsI18NTestsMultiPackage(SimpleTestCase): """ Tests for django views in django/views/i18n.py that need to change settings.LANGUAGE_CODE and merge JS translation from several packages. diff --git a/tests/view_tests/tests/test_json.py b/tests/view_tests/tests/test_json.py index 68ba183090..0d6bc09120 100644 --- a/tests/view_tests/tests/test_json.py +++ b/tests/view_tests/tests/test_json.py @@ -3,11 +3,11 @@ from __future__ import unicode_literals import json -from django.test import TestCase, override_settings +from django.test import SimpleTestCase, override_settings @override_settings(ROOT_URLCONF='view_tests.generic_urls') -class JsonResponseTests(TestCase): +class JsonResponseTests(SimpleTestCase): def test_json_response(self): response = self.client.get('/json/response/') diff --git a/tests/view_tests/tests/test_specials.py b/tests/view_tests/tests/test_specials.py index c8997ed57a..59428f9a8f 100644 --- a/tests/view_tests/tests/test_specials.py +++ b/tests/view_tests/tests/test_specials.py @@ -1,11 +1,11 @@ # -*- coding: utf-8 -*- from __future__ import unicode_literals -from django.test import TestCase, override_settings +from django.test import SimpleTestCase, override_settings @override_settings(ROOT_URLCONF='view_tests.generic_urls') -class URLHandling(TestCase): +class URLHandling(SimpleTestCase): """ Tests for URL handling in views and responses. """ |
