Refs #29514 -- Added test for get_default_timezone()/timezone.utc equality.
This commit is contained in:
parent
2ec151e35d
commit
f4ef71c689
|
@ -190,6 +190,10 @@ class TimezoneTests(SimpleTestCase):
|
||||||
def test_get_default_timezone(self):
|
def test_get_default_timezone(self):
|
||||||
self.assertEqual(timezone.get_default_timezone_name(), 'America/Chicago')
|
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):
|
def test_fixedoffset_timedelta(self):
|
||||||
delta = datetime.timedelta(hours=1)
|
delta = datetime.timedelta(hours=1)
|
||||||
self.assertEqual(timezone.get_fixed_timezone(delta).utcoffset(''), delta)
|
self.assertEqual(timezone.get_fixed_timezone(delta).utcoffset(''), delta)
|
||||||
|
|
Loading…
Reference in New Issue