Ejemplo n.º 1
0
 def test_start_of_yesterday_with_datetime(self):
     dt = datetime(year=2016, month=2, day=29, hour=22, minute=33, second=9)
     expected_dt = datetime(year=2016, month=2, day=28,
                            hour=0, minute=0, second=0, microsecond=0)
     self.assertEqual(start_of_yesterday(dt), expected_dt)
Ejemplo n.º 2
0
 def test_start_of_yesterday_with_date(self):
     d = date(year=2016, month=1, day=1)
     expected_dt = datetime(year=2015, month=12, day=31,
                            hour=0, minute=0, second=0, microsecond=0)
     self.assertEqual(start_of_yesterday(d), expected_dt)