1
0
mirror of https://github.com/django/django.git synced 2025-10-24 06:06:09 +00:00

Refs #32365 -- Removed internal uses of utils.timezone.utc alias.

Remaining test case ensures that uses of the alias are mapped
canonically by the migration writer.
This commit is contained in:
Carlton Gibson
2022-03-23 12:15:36 +01:00
committed by Mariusz Felisiak
parent 1cf60ce601
commit bb61f0186d
33 changed files with 115 additions and 102 deletions

View File

@@ -2,7 +2,7 @@ import datetime
from django.test import SimpleTestCase
from django.utils import feedgenerator
from django.utils.timezone import get_fixed_timezone, utc
from django.utils.timezone import get_fixed_timezone
class FeedgeneratorTests(SimpleTestCase):
@@ -144,4 +144,7 @@ class FeedgeneratorTests(SimpleTestCase):
for use_tz in (True, False):
with self.settings(USE_TZ=use_tz):
rss_feed = feedgenerator.Rss201rev2Feed("title", "link", "description")
self.assertEqual(rss_feed.latest_post_date().tzinfo, utc)
self.assertEqual(
rss_feed.latest_post_date().tzinfo,
datetime.timezone.utc,
)