예제 #1
0
 def test_ne(self):
     tz1 = pytz.timezone("Europe/Paris")
     tz2 = pytz.timezone("Europe/Prague")
     raw = {}
     self.assertNotEqual(Timezone(tz1, raw), Timezone(tz2, raw))
예제 #2
0
 def test_repr(self):
     raw = dict(foo="bar")
     pytz_timezone = pytz.timezone(self.timezone_name)
     tz = Timezone(pytz_timezone, raw)
     self.assertEqual(repr(tz), "Timezone(%s)" % repr(pytz_timezone))
예제 #3
0
 def test_eq(self):
     tz = pytz.timezone("Europe/Paris")
     raw1 = dict(a=1)
     raw2 = dict(a=1)
     self.assertEqual(Timezone(tz, raw1), Timezone(tz, raw2))
예제 #4
0
 def test_create_from_pytz_timezone(self):
     pytz_timezone = pytz.timezone(self.timezone_name)
     tz = Timezone(pytz_timezone)
     self.assertIs(tz.pytz_timezone, pytz_timezone)