def test_Methodheap_MythXML_002_010(self):
        """Test MythXML.getRecorded() during standard time and
           daylight saving time.
        """
        preview_cet_is_pic = False
        preview_cest_is_pic = False
        with add_log_flags():
            m_instance = MythXML()
            progs = m_instance.getRecorded()
            try:
                found_cet = False
                found_cest = False
                while True:
                    p = next(progs)
                    if not found_cet:
                        if (p.starttime > self.t1_cet
                                and p.starttime < self.t2_cet):
                            pcet = p
                            found_cet = True
                    if not found_cest:
                        if (p.starttime > self.t1_cest
                                and p.starttime < self.t2_cest):
                            pcest = p
                            found_cest = True
                    if (found_cet and found_cest):
                        break
            except StopIteration:
                raise

            preview_cet = m_instance.getPreviewImage(str(pcet.chanid),
                                                     pcet.recstartts)
            with open('/tmp/preview_cet', 'wb') as f:
                f.write(preview_cet)
            out_cet = System.system('file /tmp/preview_cet')
            preview_cet_is_pic = (len(
                tailandgrep('/tmp/my_logfile', 2, 'JPEG|PNG')) > 0)

            preview_cest = m_instance.getPreviewImage(str(pcest.chanid),
                                                      pcest.recstartts)
            with open('/tmp/preview_cest', 'wb') as f:
                f.write(preview_cest)
            out_cest = System.system('file /tmp/preview_cest')
            preview_cest_is_pic = (len(
                tailandgrep('/tmp/my_logfile', 2, 'JPEG|PNG')) > 0)

        self.assertTrue(preview_cet_is_pic)
        self.assertTrue(preview_cest_is_pic)
 def test_Methodheap_MythXML_002_09(self):
     """Test MythXML.getPreviewImage()."""
     a = False
     with add_log_flags():
         m_instance = MythXML()
         rec_chanid = self.testenv['DOWNCHANID']
         rec_starttime = self.testenv['DOWNSTARTTIME']
         preview = m_instance.getPreviewImage(str(rec_chanid),
                                              rec_starttime)
         with open('/tmp/preview', 'wb') as f:
             f.write(preview)
         out1 = System.system('file /tmp/preview')
         a = (len(tailandgrep('/tmp/my_logfile', 8, 'JPEG|PNG')) > 0)
     self.assertTrue(a)