diff --git a/django/conf/__init__.py b/django/conf/__init__.py
index 1804c85..4e6f0f9 100644
a
|
b
|
class LazySettings(LazyObject):
|
83 | 83 | for name, value in options.items(): |
84 | 84 | setattr(holder, name, value) |
85 | 85 | self._wrapped = holder |
| 86 | self._configure_logging() |
86 | 87 | |
87 | 88 | @property |
88 | 89 | def configured(self): |
diff --git a/tests/regressiontests/logging_tests/tests.py b/tests/regressiontests/logging_tests/tests.py
index e40800e..02d37be 100644
a
|
b
|
import copy
|
4 | 4 | import logging |
5 | 5 | import warnings |
6 | 6 | |
7 | | from django.conf import compat_patch_logging_config |
| 7 | from django.conf import compat_patch_logging_config, LazySettings |
8 | 8 | from django.core import mail |
9 | 9 | from django.test import TestCase, RequestFactory |
10 | 10 | from django.test.utils import override_settings |
… |
… |
class SettingsConfigTest(AdminScriptTestCase):
|
302 | 302 | out, err = self.run_manage(['validate']) |
303 | 303 | self.assertNoOutput(err) |
304 | 304 | self.assertOutput(out, "0 errors found") |
| 305 | |
| 306 | |
| 307 | def dictConfig(config): |
| 308 | dictConfig.called = True |
| 309 | dictConfig.called = False |
| 310 | |
| 311 | |
| 312 | class SettingsConfigureLogging(SimpleTestCase): |
| 313 | """ |
| 314 | Test that calling settings.configure() initializes the logging |
| 315 | configuration. |
| 316 | """ |
| 317 | def test_configure_initializes_logging(self): |
| 318 | settings = LazySettings() |
| 319 | settings.configure( |
| 320 | LOGGING_CONFIG='regressiontests.logging_tests.tests.dictConfig') |
| 321 | self.assertTrue(dictConfig.called) |