def test_getzipfile(self): conf = self.get_conf() w = Worker(conf) p = w.get_zipfile("http://localhost:9000/download/test.zip", conf['app']['internaltoken'], "/tmp/") assert p == "/tmp/test.zip" assert os.path.exists("/tmp/test.zip")
def test_do_sphinx(self): conf = self.get_conf() w = Worker(conf) p = w.get_zipfile("http://localhost:9000/download/test.zip", conf['app']['internaltoken'], "/tmp/") d = w.extract(p, "/tmp/") req = {} print w.do_sphinx(d, req, conf)
def test_extract(self): conf = self.get_conf() w = Worker(conf) p = w.get_zipfile("http://localhost:9000/download/test.zip", conf['app']['internaltoken'], "/tmp/") d = w.extract(p, "/tmp/") assert d.startswith("/tmp/") assert os.path.isdir(d) shutil.rmtree(d)