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/postgres_tests | |
| parent | 1cf60ce6017d904024ee132f7edae0b4b821a954 (diff) | |
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/postgres_tests')
| -rw-r--r-- | tests/postgres_tests/test_ranges.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/postgres_tests/test_ranges.py b/tests/postgres_tests/test_ranges.py index aaef47d6be..86722a9f46 100644 --- a/tests/postgres_tests/test_ranges.py +++ b/tests/postgres_tests/test_ranges.py @@ -563,8 +563,8 @@ class TestSerialization(PostgreSQLSimpleTestCase): lower_date = datetime.date(2014, 1, 1) upper_date = datetime.date(2014, 2, 2) - lower_dt = datetime.datetime(2014, 1, 1, 0, 0, 0, tzinfo=timezone.utc) - upper_dt = datetime.datetime(2014, 2, 2, 12, 12, 12, tzinfo=timezone.utc) + lower_dt = datetime.datetime(2014, 1, 1, 0, 0, 0, tzinfo=datetime.timezone.utc) + upper_dt = datetime.datetime(2014, 2, 2, 12, 12, 12, tzinfo=datetime.timezone.utc) def test_dumping(self): instance = RangesModel( @@ -991,7 +991,8 @@ class TestFormField(PostgreSQLSimpleTestCase): field = pg_forms.DateTimeRangeField() value = field.prepare_value( DateTimeTZRange( - datetime.datetime(2015, 5, 22, 16, 6, 33, tzinfo=timezone.utc), None + datetime.datetime(2015, 5, 22, 16, 6, 33, tzinfo=datetime.timezone.utc), + None, ) ) self.assertEqual(value, [datetime.datetime(2015, 5, 22, 18, 6, 33), None]) |
