示例#1
0
 def test_repr(self):
     tz = utils.create_timezone(1234)
     self.assertEqual("Timezone +2034", repr(tz))
示例#2
0
 def test_dst(self):
     tz = utils.create_timezone(1234)
     offset = tz.dst(datetime.datetime.now())
     self.assertEqual(datetime.timedelta(0), offset)
示例#3
0
 def test_name(self):
     tz = utils.create_timezone(1234)
     name = tz.tzname(datetime.datetime.now())
     self.assertIsNone(name)
示例#4
0
 def test_utcoffset(self):
     tz = utils.create_timezone(1234)
     offset = tz.utcoffset(datetime.datetime.now())
     self.assertEqual(datetime.timedelta(minutes=1234), offset)
示例#5
0
 def test_repr(self):
     tz = utils.create_timezone(1234)
     self.assertEqual("Timezone +2034", repr(tz))
示例#6
0
 def test_name(self):
     tz = utils.create_timezone(1234)
     name = tz.tzname(datetime.datetime.now())
     self.assertIsNone(name)
示例#7
0
 def test_dst(self):
     tz = utils.create_timezone(1234)
     offset = tz.dst(datetime.datetime.now())
     self.assertEqual(datetime.timedelta(0), offset)
示例#8
0
 def test_utcoffset(self):
     tz = utils.create_timezone(1234)
     offset = tz.utcoffset(datetime.datetime.now())
     self.assertEqual(datetime.timedelta(minutes=1234), offset)