Esempio n. 1
0
 def test_starttime_DataFromNativeMySQL(self):
     data = {
         'starttime':
         datetime.timedelta(seconds=(1 * 60 * 60) + (2 * 60) + 3)
     }
     schedule = ScheduleFromQuery(data, Mock())
     self.assertEquals('010203', schedule.starttime())
Esempio n. 2
0
 def test_enddate_DataFromPythonMySQL(self):
     data = {'enddate': '2008-11-12'}
     schedule = ScheduleFromQuery(data, Mock())
     self.assertEquals('20081112', schedule.enddate())
Esempio n. 3
0
 def test_enddate_DataFromNativeMySQL(self):
     data = {'enddate': datetime.date(2008, 11, 12)}
     schedule = ScheduleFromQuery(data, Mock())
     self.assertEquals('20081112', schedule.enddate())
Esempio n. 4
0
 def test_endtime_DataFromPythonMySQL(self):
     data = {'endtime': '23:11:59'}
     schedule = ScheduleFromQuery(data, Mock())
     self.assertEquals('231159', schedule.endtime())