Ejemplo n.º 1
0
 def test_time_timtravel(self, seconds=1, minutes=1, microseconds=100):
     d = Delorean()
     sample = datetime(2011, 10, 10, 1, 33, 4, 121940)
     d.utcdatetime = sample
     current_time = d.datetime()
     current_time = current_time + timedelta(seconds=1, minutes=1, microseconds=100)
     d.timetravel(seconds=1, minutes=1, microseconds=100)
     self.assertEqual(d.time(), current_time.time())
Ejemplo n.º 2
0
 def test_date_timetravel(self, days=1, weeks=1):
     d=Delorean()
     sample = datetime(2002,10,10)
     d.utcdatetime = sample
     current_date = d.date()
     current_date = current_date + timedelta(days=1, weeks=1)
     d.timetravel(days=1, weeks=1)
     self.assertEqual(d.date(), current_date)