mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +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:
committed by
Mariusz Felisiak
parent
1cf60ce601
commit
bb61f0186d
@@ -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,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user