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
@@ -1,7 +1,6 @@
|
||||
import datetime
|
||||
|
||||
from django.test import TestCase, skipIfDBFeature
|
||||
from django.utils.timezone import utc
|
||||
|
||||
from .models import Donut, RumBaba
|
||||
|
||||
@@ -94,7 +93,7 @@ class DataTypesTestCase(TestCase):
|
||||
def test_error_on_timezone(self):
|
||||
"""Regression test for #8354: the MySQL and Oracle backends should raise
|
||||
an error if given a timezone-aware datetime object."""
|
||||
dt = datetime.datetime(2008, 8, 31, 16, 20, tzinfo=utc)
|
||||
dt = datetime.datetime(2008, 8, 31, 16, 20, tzinfo=datetime.timezone.utc)
|
||||
d = Donut(name="Bear claw", consumed_at=dt)
|
||||
# MySQL backend does not support timezone-aware datetimes.
|
||||
with self.assertRaises(ValueError):
|
||||
|
||||
Reference in New Issue
Block a user