diff options
author | Carlton Gibson <carlton.gibson@noumenal.es> | 2022-03-23 12:15:36 +0100 |
---|---|---|
committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-03-24 06:29:50 +0100 |
commit | bb61f0186d5c490caa44f3e3672d81e14414d33c (patch) | |
tree | 71e682d415e4640fd1e950af0e4921b2af57ea60 /tests/datatypes | |
parent | 1cf60ce6017d904024ee132f7edae0b4b821a954 (diff) | |
download | django-bb61f0186d5c490caa44f3e3672d81e14414d33c.tar.gz |
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.
Diffstat (limited to 'tests/datatypes')
-rw-r--r-- | tests/datatypes/tests.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/tests/datatypes/tests.py b/tests/datatypes/tests.py index 56f6c14c31..97f3ec0852 100644 --- a/tests/datatypes/tests.py +++ b/tests/datatypes/tests.py @@ -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): |