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/logging_tests | |
| parent | e2b77aceddbda9071fcfc38f90fb50d091d0b5fc (diff) | |
Refs #24652 -- Used SimpleTestCase where appropriate.
Diffstat (limited to 'tests/logging_tests')
| -rw-r--r-- | tests/logging_tests/tests.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/logging_tests/tests.py b/tests/logging_tests/tests.py index 5ee1092c41..c1768da838 100644 --- a/tests/logging_tests/tests.py +++ b/tests/logging_tests/tests.py @@ -8,7 +8,7 @@ from admin_scripts.tests import AdminScriptTestCase from django.core import mail from django.core.files.temp import NamedTemporaryFile -from django.test import RequestFactory, TestCase, override_settings +from django.test import RequestFactory, SimpleTestCase, override_settings from django.test.utils import LoggingCaptureMixin, patch_logger from django.utils.deprecation import RemovedInNextVersionWarning from django.utils.encoding import force_text @@ -39,7 +39,7 @@ OLD_LOGGING = { } -class LoggingFiltersTest(TestCase): +class LoggingFiltersTest(SimpleTestCase): def test_require_debug_false_filter(self): """ Test the RequireDebugFalse filter class. @@ -65,7 +65,7 @@ class LoggingFiltersTest(TestCase): self.assertEqual(filter_.filter("record is not used"), False) -class DefaultLoggingTest(LoggingCaptureMixin, TestCase): +class DefaultLoggingTest(LoggingCaptureMixin, SimpleTestCase): def test_django_logger(self): """ @@ -79,7 +79,7 @@ class DefaultLoggingTest(LoggingCaptureMixin, TestCase): self.assertEqual(self.logger_output.getvalue(), 'Hey, this is an error.\n') -class WarningLoggerTests(TestCase): +class WarningLoggerTests(SimpleTestCase): """ Tests that warnings output for RemovedInDjangoXXWarning (XX being the next Django version) is enabled and captured to the logging system @@ -137,7 +137,7 @@ class WarningLoggerTests(TestCase): warnings.warn('Foo Deprecated', RemovedInNextVersionWarning) -class CallbackFilterTest(TestCase): +class CallbackFilterTest(SimpleTestCase): def test_sense(self): f_false = CallbackFilter(lambda r: False) f_true = CallbackFilter(lambda r: True) @@ -158,7 +158,7 @@ class CallbackFilterTest(TestCase): self.assertEqual(collector, ["a record"]) -class AdminEmailHandlerTest(TestCase): +class AdminEmailHandlerTest(SimpleTestCase): logger = logging.getLogger('django') def get_admin_email_handler(self, logger): @@ -385,7 +385,7 @@ def dictConfig(config): dictConfig.called = False -class SetupConfigureLogging(TestCase): +class SetupConfigureLogging(SimpleTestCase): """ Test that calling django.setup() initializes the logging configuration. """ @@ -398,7 +398,7 @@ class SetupConfigureLogging(TestCase): @override_settings(DEBUG=True, ROOT_URLCONF='logging_tests.urls') -class SecurityLoggerTest(TestCase): +class SecurityLoggerTest(SimpleTestCase): def test_suspicious_operation_creates_log_message(self): with patch_logger('django.security.SuspiciousOperation', 'error') as calls: |
