def test_ne(self): tz1 = pytz.timezone("Europe/Paris") tz2 = pytz.timezone("Europe/Prague") raw = {} self.assertNotEqual(Timezone(tz1, raw), Timezone(tz2, raw))
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))
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))
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)