From f4ef71c689b7bf3b0237d12c634fe5557f646a79 Mon Sep 17 00:00:00 2001 From: Carlton Gibson Date: Thu, 28 Jun 2018 09:30:10 -0400 Subject: [PATCH] Refs #29514 -- Added test for get_default_timezone()/timezone.utc equality. --- tests/utils_tests/test_timezone.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/utils_tests/test_timezone.py b/tests/utils_tests/test_timezone.py index 32906f8b88..5069b82e5b 100644 --- a/tests/utils_tests/test_timezone.py +++ b/tests/utils_tests/test_timezone.py @@ -190,6 +190,10 @@ class TimezoneTests(SimpleTestCase): def test_get_default_timezone(self): self.assertEqual(timezone.get_default_timezone_name(), 'America/Chicago') + def test_get_default_timezone_utc(self): + with override_settings(USE_TZ=True, TIME_ZONE='UTC'): + self.assertIs(timezone.get_default_timezone(), timezone.utc) + def test_fixedoffset_timedelta(self): delta = datetime.timedelta(hours=1) self.assertEqual(timezone.get_fixed_timezone(delta).utcoffset(''), delta)