def _test_all(self, nickname):
        """ 
            I want to start a Tribler client once and then connect to
            it many times. So there must be only one test method
            to prevent setUp() from creating a new client every time.

            The code is constructed so unittest will show the name of the
            (sub)test where the error occured in the traceback it prints.
        """

        TestChannels._test_all(self, nickname)
        self.subtest_channelcastPlusMetadata()
    def _test_all(self,nickname):
        """ 
            I want to start a Tribler client once and then connect to
            it many times. So there must be only one test method
            to prevent setUp() from creating a new client every time.

            The code is constructed so unittest will show the name of the
            (sub)test where the error occured in the traceback it prints.
        """
        
        TestChannels._test_all(self,nickname)
        self.subtest_channelcastPlusMetadata()
 def setupDB(self,nickname):
     TestChannels.setupDB(self,nickname)
     try:
         self.richMetadata_db = self.session.open_dbhandler(NTFY_RICH_METADATA)
         #add some metadata for torrents (they are defined in TestChannels.setupDB()
         self.mdto = MetadataDTO(self.hispermid, self.infohash1)
         subtitle1 = SubtitleInfo("nld", os.path.join(RES_DIR,"fake.srt"))
         subtitle1.computeChecksum()
         
         subtitle2 = SubtitleInfo("eng", os.path.join(RES_DIR, "fake0.srt"))
         subtitle2.computeChecksum()
         self.mdto.addSubtitle(subtitle1)
         self.mdto.addSubtitle(subtitle2)
         
         self.mdto.sign(self.his_keypair)
         
         self.richMetadata_db.insertMetadata(self.mdto)
     except:
         print_exc()
    def setupDB(self, nickname):
        TestChannels.setupDB(self, nickname)
        try:
            self.richMetadata_db = self.session.open_dbhandler(
                NTFY_RICH_METADATA)
            #add some metadata for torrents (they are defined in TestChannels.setupDB()
            self.mdto = MetadataDTO(self.hispermid, self.infohash1)
            subtitle1 = SubtitleInfo("nld", os.path.join(RES_DIR, "fake.srt"))
            subtitle1.computeChecksum()

            subtitle2 = SubtitleInfo("eng", os.path.join(RES_DIR, "fake0.srt"))
            subtitle2.computeChecksum()
            self.mdto.addSubtitle(subtitle1)
            self.mdto.addSubtitle(subtitle2)

            self.mdto.sign(self.his_keypair)

            self.richMetadata_db.insertMetadata(self.mdto)
        except:
            print_exc()
 def tearDown(self):
     TestChannels.tearDown(self)
     self.session.close_dbhandler(self.richMetadata_db)
 def tearDown(self):
     TestChannels.tearDown(self)
     self.session.close_dbhandler(self.richMetadata_db)