1
0
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:
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

@@ -909,7 +909,7 @@ class WriterTests(SimpleTestCase):
Test comments at top of file.
"""
migration = type("Migration", (migrations.Migration,), {"operations": []})
dt = datetime.datetime(2015, 7, 31, 4, 40, 0, 0, tzinfo=utc)
dt = datetime.datetime(2015, 7, 31, 4, 40, 0, 0, tzinfo=datetime.timezone.utc)
with mock.patch("django.db.migrations.writer.now", lambda: dt):
for include_header in (True, False):
with self.subTest(include_header=include_header):