def test_starttime_TypeInDataDictIsAString(self): p = ProgramFromQuery({'starttime': '2008-11-21 14:00:00'}, self.settings, self.translator) self.assertEquals('20081121140000', p.starttime())
def test_starttime_TypeInDataDictIsADateTime(self): p = ProgramFromQuery( {'starttime': datetime.datetime(2008, 11, 21, 14)}, self.settings, self.translator) self.assertEquals('20081121140000', p.starttime())
def test_starttimeAsTime(self): program = ProgramFromQuery(self.data, self.settings, self.translator) time = program.starttimeAsTime() log.debug('startTime = %s' % time) self.assertTrue(time)
def test_constructor(self): program = ProgramFromQuery(self.data, self.settings, self.translator) self.assertTrue(program is not None)
def test_starttime_TypeInDataDictIsADateTime(self): p = ProgramFromQuery({'starttime': datetime.datetime(2008, 11, 21, 14)}, self.settings, self.translator) self.assertEquals('20081121140000', p.starttime())
def test_starttime_TypeInDataDictIsAString(self): p = ProgramFromQuery({'starttime':'2008-11-21 14:00:00'}, self.settings, self.translator) self.assertEquals('20081121140000', p.starttime())
def test_starttimeAsTime(self): program = ProgramFromQuery(self.data, self.settings, self.translator) time = program.starttimeAsTime() log.debug('startTime = %s'%time) self.assertTrue(time)