summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2013-12-31 12:28:01 +0100
committerClaude Paroz <claude@2xlibre.net>2013-12-31 18:35:00 +0100
commitb8e3373f458aa363d59c61b58be390a5a1156467 (patch)
treee2805d1eff7056999c5cf46b6c4c088fbae8d790 /tests
parent1d23d766ab85301eb527629400933fd601355f1a (diff)
Fixed #21714 -- Moved logging configuration to global setup()
Thanks Aymeric Augustin for the report and the review.
Diffstat (limited to 'tests')
-rw-r--r--tests/logging_tests/tests.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/tests/logging_tests/tests.py b/tests/logging_tests/tests.py
index a6791cfa76..f020bfddef 100644
--- a/tests/logging_tests/tests.py
+++ b/tests/logging_tests/tests.py
@@ -3,7 +3,6 @@ from __future__ import unicode_literals
import logging
import warnings
-from django.conf import LazySettings
from django.core import mail
from django.test import TestCase, RequestFactory, override_settings
from django.test.utils import patch_logger
@@ -342,15 +341,14 @@ def dictConfig(config):
dictConfig.called = False
-class SettingsConfigureLogging(TestCase):
+class SetupConfigureLogging(TestCase):
"""
- Test that calling settings.configure() initializes the logging
- configuration.
+ Test that calling django.setup() initializes the logging configuration.
"""
+ @override_settings(LOGGING_CONFIG='logging_tests.tests.dictConfig')
def test_configure_initializes_logging(self):
- settings = LazySettings()
- settings.configure(
- LOGGING_CONFIG='logging_tests.tests.dictConfig')
+ from django import setup
+ setup()
self.assertTrue(dictConfig.called)