summaryrefslogtreecommitdiff
path: root/tests/settings_tests
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2023-01-06 12:30:23 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2023-01-17 11:49:15 +0100
commit602d9a312facc64d44619c61c3863d3d0820006a (patch)
tree17b8b2ab40703379970e34befff052a4ff8849ce /tests/settings_tests
parent4aa06890805f8bc619d240ca5b4e2cd81be308c1 (diff)
downloaddjango-602d9a312facc64d44619c61c3863d3d0820006a.tar.gz
Refs #32379 -- Changed default USE_TZ to True.
Per deprecation timeline.
Diffstat (limited to 'tests/settings_tests')
-rw-r--r--tests/settings_tests/tests.py16
1 files changed, 0 insertions, 16 deletions
diff --git a/tests/settings_tests/tests.py b/tests/settings_tests/tests.py
index f9ea7700bb..32a9c6cc19 100644
--- a/tests/settings_tests/tests.py
+++ b/tests/settings_tests/tests.py
@@ -348,25 +348,9 @@ class SettingsTests(SimpleTestCase):
with self.assertRaisesMessage(ValueError, "Incorrect timezone setting: test"):
settings._setup()
- def test_use_tz_false_deprecation(self):
- settings_module = ModuleType("fake_settings_module")
- settings_module.SECRET_KEY = "foo"
- sys.modules["fake_settings_module"] = settings_module
- msg = (
- "The default value of USE_TZ will change from False to True in "
- "Django 5.0. Set USE_TZ to False in your project settings if you "
- "want to keep the current default behavior."
- )
- try:
- with self.assertRaisesMessage(RemovedInDjango50Warning, msg):
- Settings("fake_settings_module")
- finally:
- del sys.modules["fake_settings_module"]
-
def test_use_deprecated_pytz_deprecation(self):
settings_module = ModuleType("fake_settings_module")
settings_module.USE_DEPRECATED_PYTZ = True
- settings_module.USE_TZ = True
sys.modules["fake_settings_module"] = settings_module
try:
with self.assertRaisesMessage(