summaryrefslogtreecommitdiff
path: root/tests/settings_tests
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2023-01-09 09:03:38 +0100
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2023-01-17 11:49:15 +0100
commite6f82438d4e3750e8d299bfd79dac98eebe9f1e0 (patch)
tree4ee0cbf2c0be9822416aa3d65105f35a9784fd94 /tests/settings_tests
parent8d98f99a4ab5de6f2c730399f53eba8bf6bea470 (diff)
downloaddjango-e6f82438d4e3750e8d299bfd79dac98eebe9f1e0.tar.gz
Refs #32365 -- Removed support for pytz timezones per deprecation timeline.
Diffstat (limited to 'tests/settings_tests')
-rw-r--r--tests/settings_tests/tests.py27
1 files changed, 1 insertions, 26 deletions
diff --git a/tests/settings_tests/tests.py b/tests/settings_tests/tests.py
index 32a9c6cc19..d6666537de 100644
--- a/tests/settings_tests/tests.py
+++ b/tests/settings_tests/tests.py
@@ -4,13 +4,7 @@ import unittest
from types import ModuleType, SimpleNamespace
from unittest import mock
-from django.conf import (
- ENVIRONMENT_VARIABLE,
- USE_DEPRECATED_PYTZ_DEPRECATED_MSG,
- LazySettings,
- Settings,
- settings,
-)
+from django.conf import ENVIRONMENT_VARIABLE, LazySettings, Settings, settings
from django.core.exceptions import ImproperlyConfigured
from django.http import HttpRequest
from django.test import (
@@ -23,7 +17,6 @@ from django.test import (
)
from django.test.utils import requires_tz_support
from django.urls import clear_script_prefix, set_script_prefix
-from django.utils.deprecation import RemovedInDjango50Warning
@modify_settings(ITEMS={"prepend": ["b"], "append": ["d"], "remove": ["a", "e"]})
@@ -348,24 +341,6 @@ class SettingsTests(SimpleTestCase):
with self.assertRaisesMessage(ValueError, "Incorrect timezone setting: test"):
settings._setup()
- def test_use_deprecated_pytz_deprecation(self):
- settings_module = ModuleType("fake_settings_module")
- settings_module.USE_DEPRECATED_PYTZ = True
- sys.modules["fake_settings_module"] = settings_module
- try:
- with self.assertRaisesMessage(
- RemovedInDjango50Warning, USE_DEPRECATED_PYTZ_DEPRECATED_MSG
- ):
- Settings("fake_settings_module")
- finally:
- del sys.modules["fake_settings_module"]
-
- holder = LazySettings()
- with self.assertRaisesMessage(
- RemovedInDjango50Warning, USE_DEPRECATED_PYTZ_DEPRECATED_MSG
- ):
- holder.configure(USE_DEPRECATED_PYTZ=True)
-
class TestComplexSettingOverride(SimpleTestCase):
def setUp(self):