예제 #1
0
 def test_starttime_TypeInDataDictIsAString(self):
     p = ProgramFromQuery({'starttime': '2008-11-21 14:00:00'},
                          self.settings, self.translator)
     self.assertEquals('20081121140000', p.starttime())
예제 #2
0
 def test_starttime_TypeInDataDictIsADateTime(self):
     p = ProgramFromQuery(
         {'starttime': datetime.datetime(2008, 11, 21, 14)}, self.settings,
         self.translator)
     self.assertEquals('20081121140000', p.starttime())
예제 #3
0
 def test_starttimeAsTime(self):
     program = ProgramFromQuery(self.data, self.settings, self.translator)
     time = program.starttimeAsTime()
     log.debug('startTime = %s' % time)
     self.assertTrue(time)
예제 #4
0
 def test_constructor(self):
     program = ProgramFromQuery(self.data, self.settings, self.translator)
     self.assertTrue(program is not None)
예제 #5
0
 def test_starttime_TypeInDataDictIsADateTime(self):
     p = ProgramFromQuery({'starttime': datetime.datetime(2008, 11, 21, 14)}, self.settings, self.translator)
     self.assertEquals('20081121140000', p.starttime())
예제 #6
0
 def test_starttime_TypeInDataDictIsAString(self):
     p = ProgramFromQuery({'starttime':'2008-11-21 14:00:00'}, self.settings, self.translator)
     self.assertEquals('20081121140000', p.starttime())
예제 #7
0
 def test_starttimeAsTime(self):
     program = ProgramFromQuery(self.data, self.settings, self.translator) 
     time = program.starttimeAsTime()
     log.debug('startTime = %s'%time)
     self.assertTrue(time)