mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Refs #32365 -- Removed is_dst argument for various methods and functions.
Per deprecation timeline.
This commit is contained in:
@@ -8,7 +8,6 @@ except ImportError:
|
||||
|
||||
from django.test import SimpleTestCase, override_settings
|
||||
from django.utils import timezone
|
||||
from django.utils.deprecation import RemovedInDjango50Warning
|
||||
|
||||
PARIS_ZI = zoneinfo.ZoneInfo("Europe/Paris")
|
||||
EAT = timezone.get_fixed_timezone(180) # Africa/Nairobi
|
||||
@@ -226,17 +225,6 @@ class TimezoneTests(SimpleTestCase):
|
||||
self.assertEqual(std.utcoffset(), datetime.timedelta(hours=1))
|
||||
self.assertEqual(dst.utcoffset(), datetime.timedelta(hours=2))
|
||||
|
||||
def test_make_aware_is_dst_deprecation_warning(self):
|
||||
msg = (
|
||||
"The is_dst argument to make_aware(), used by the Trunc() "
|
||||
"database functions and QuerySet.datetimes(), is deprecated as it "
|
||||
"has no effect with zoneinfo time zones."
|
||||
)
|
||||
with self.assertRaisesMessage(RemovedInDjango50Warning, msg):
|
||||
timezone.make_aware(
|
||||
datetime.datetime(2011, 9, 1, 13, 20, 30), EAT, is_dst=True
|
||||
)
|
||||
|
||||
def test_get_timezone_name(self):
|
||||
"""
|
||||
The _get_timezone_name() helper must return the offset for fixed offset
|
||||
|
||||
Reference in New Issue
Block a user