Ejemplo n.º 1
0
    def test_move_day_function(self):
        dt_next = datetime(2013, 1, 4, 4, 31, 14, 148546, tzinfo=utc)
        dt_last = datetime(2013, 1, 2, 4, 31, 14, 148546, tzinfo=utc)

        d_obj_next = delorean.move_datetime_day(self.do.datetime, 'next', 1)
        d_obj_last = delorean.move_datetime_day(self.do.datetime, 'last', 1)

        self.assertEqual(dt_next, d_obj_next)
        self.assertEqual(dt_last, d_obj_last)
Ejemplo n.º 2
0
    def test_move_day_function(self):
        dt_next = datetime(2013, 1, 4, 4, 31, 14, 148540, tzinfo=utc)
        dt_last = datetime(2013, 1, 2, 4, 31, 14, 148540, tzinfo=utc)

        d_obj_next = delorean.move_datetime_day(self.do.datetime, 'next', 1)
        d_obj_last = delorean.move_datetime_day(self.do.datetime, 'last', 1)

        self.assertEqual(dt_next, d_obj_next)
        self.assertEqual(dt_last, d_obj_last)