def test_repr(self): tz = utils.create_timezone(1234) self.assertEqual("Timezone +2034", repr(tz))
def test_dst(self): tz = utils.create_timezone(1234) offset = tz.dst(datetime.datetime.now()) self.assertEqual(datetime.timedelta(0), offset)
def test_name(self): tz = utils.create_timezone(1234) name = tz.tzname(datetime.datetime.now()) self.assertIsNone(name)
def test_utcoffset(self): tz = utils.create_timezone(1234) offset = tz.utcoffset(datetime.datetime.now()) self.assertEqual(datetime.timedelta(minutes=1234), offset)