def test_Methodheap_MythXML_001_04(self): """Test MythXML.getProgramGuide() """ now_0 = pdtime.now() now_4 = now_0 + pddelta(hours=4) m_instance = MythXML() guide_list = m_instance.getProgramGuide(now_0.isoformat(), now_4.isoformat(), self.testenv['RECCHANID'], numchan=None) prog = next(guide_list) self.assertTrue(len(prog.title) > 0)
def test_Methodheap_MythXML_001_05(self): """Test MythXML.getProgramDetails(). """ now_0 = pdtime.now() now_4 = now_0 + pddelta(hours=4) m_instance = MythXML() guide_list = m_instance.getProgramGuide(now_0.isoformat(), now_4.isoformat(), self.testenv['RECCHANID'], numchan=None) prog = next(guide_list) self.assertTrue(len(prog.title) > 0) p_details = m_instance.getProgramDetails(prog.chanid, prog.starttime) #print(repr(p_details)) self.assertTrue(len(p_details.title) > 0)
def test_Methodheap_MythXML_002_04(self): """Test MythXML.getProgramGuide() with logging.""" a = False with add_log_flags(): now_0 = pdtime.now() now_4 = now_0 + pddelta(hours=4) m_instance = MythXML() guide_list = m_instance.getProgramGuide(now_0.isoformat(), now_4.isoformat(), self.testenv['RECCHANID'], numchan=None) prog = next(guide_list) self.assertTrue(len(prog.title) > 0) a = (len(tailandgrep('/tmp/my_logfile', 20, r'GetProgramGuide')) > 0) self.assertTrue(a)