示例#1
0
 def test_schedule_time_utc(self):
     job = self.JobClass()
     est = pytz.timezone('US/Eastern')
     scheduled_time = datetime(2016, 12, 25, 8, 0, 0, tzinfo=est)
     job.scheduled_time = scheduled_time
     utc = pytz.timezone('UTC')
     expected = scheduled_time.astimezone(utc).isoformat()
     self.assertEqual(expected, job.schedule_time_utc().isoformat())
 def test_schedule_time_utc(self):
     job = self.JobClass()
     est = pytz.timezone('US/Eastern')
     scheduled_time = datetime(2016, 12, 25, 8, 0, 0, tzinfo=est)
     job.scheduled_time = scheduled_time
     utc = pytz.timezone('UTC')
     expected = scheduled_time.astimezone(utc).isoformat()
     self.assertEqual(expected, job.schedule_time_utc().isoformat())