Exemplo n.º 1
0
    def setUp(self):
	self._url            = 'https://www.google.co.jp/search?q=ruby'
        self._transaction_id = "transaction_test"
        self._result_json    = "result.json"
        self._validator      = CategoryValidator(self._url,self._transaction_id)
        self._scrapyer       = GoogSearchScrapyer()
        self._scoreler       = StdScoreler()
        self._relatedurls    = ["https://python.com","https://javascript.com"]

        self._no_cat_url_list = "./tests/data/no_cat_url.txt"
        #categorysetterexe
        self._exepath = "ls"
        self._infile  = "./tests/data/" + self._transaction_id + "1.scraped"
        self._outfile = "./tests/data/" + self._transaction_id + "1.categorized"
        self._categorysetter = CategorySetterExe(self._exepath,self._infile,self._outfile)
        rm_quoat   = lambda val: re.sub(r'\"','',val)