Пример #1
0
    def test_last_sunday_of_month(self):
        month, year = 5, 2012
        last_sunday = datetime(2012, 5, 27, 0, 0)

        result = CETTimeZone._CETTimeZone__last_sunday_of_month(year, month)

        self.assertEqual(result, last_sunday)
Пример #2
0
    def test_init(self):
        stdoffset = timedelta(hours=1)
        reprname = 'Central European'
        stdname = 'CET'
        dstname = 'CEST'

        result = CETTimeZone()

        self.assertEqual(result.stdoffset, stdoffset)
        self.assertEqual(result.reprname, reprname)
        self.assertEqual(result.stdname, stdname)
        self.assertEqual(result.dstname, dstname)