summaryrefslogtreecommitdiff
path: root/tests/regressiontests
diff options
context:
space:
mode:
Diffstat (limited to 'tests/regressiontests')
-rw-r--r--tests/regressiontests/logging_tests/tests.py19
1 files changed, 18 insertions, 1 deletions
diff --git a/tests/regressiontests/logging_tests/tests.py b/tests/regressiontests/logging_tests/tests.py
index e40800efde..96f81981c6 100644
--- a/tests/regressiontests/logging_tests/tests.py
+++ b/tests/regressiontests/logging_tests/tests.py
@@ -4,7 +4,7 @@ import copy
import logging
import warnings
-from django.conf import compat_patch_logging_config
+from django.conf import compat_patch_logging_config, LazySettings
from django.core import mail
from django.test import TestCase, RequestFactory
from django.test.utils import override_settings
@@ -302,3 +302,20 @@ class SettingsConfigTest(AdminScriptTestCase):
out, err = self.run_manage(['validate'])
self.assertNoOutput(err)
self.assertOutput(out, "0 errors found")
+
+
+def dictConfig(config):
+ dictConfig.called = True
+dictConfig.called = False
+
+
+class SettingsConfigureLogging(TestCase):
+ """
+ Test that calling settings.configure() initializes the logging
+ configuration.
+ """
+ def test_configure_initializes_logging(self):
+ settings = LazySettings()
+ settings.configure(
+ LOGGING_CONFIG='regressiontests.logging_tests.tests.dictConfig')
+ self.assertTrue(dictConfig.called)