summaryrefslogtreecommitdiffstats
path: root/tests/APIExerciser.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-04-13 17:20:59 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-04-13 17:20:59 +0200
commite00ef98491f79ae8aa972ae1473dae4a7b78c07e (patch)
tree31be0c7cdcebb61525bcc387bcf15d265a1c494a /tests/APIExerciser.py
parentFix except (diff)
downloadpyload-e00ef98491f79ae8aa972ae1473dae4a7b78c07e.tar.xz
Cleanup
Diffstat (limited to 'tests/APIExerciser.py')
-rw-r--r--tests/APIExerciser.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/APIExerciser.py b/tests/APIExerciser.py
index 0498d50b8..5e84bfefe 100644
--- a/tests/APIExerciser.py
+++ b/tests/APIExerciser.py
@@ -36,7 +36,6 @@ def startApiExerciser(core, n):
class APIExerciser(Thread):
-
def __init__(self, core, thrift=False, user=None, pw=None):
global idPool
@@ -58,6 +57,7 @@ class APIExerciser(Thread):
#self.start()
+
def run(self):
self.core.log.info("API Excerciser started %d" % self.id)
@@ -91,6 +91,7 @@ class APIExerciser(Thread):
#sleep(random() / 500)
+
def testAPI(self):
global sumCalled
@@ -111,6 +112,7 @@ class APIExerciser(Thread):
#print res
+
def addPackage(self):
name = "".join(sample(string.ascii_letters, 10))
urls = createURLs()
@@ -139,6 +141,7 @@ class APIExerciser(Thread):
pids = sample(pids, randint(1, max(floor(len(pids) / 2.5), 1)))
self.api.deletePackages(pids)
+
def getFileData(self):
info = self.api.getQueueData()
if info:
@@ -146,13 +149,16 @@ class APIExerciser(Thread):
if p.links:
self.api.getFileData(choice(p.links).fid)
+
def getPackageData(self):
info = self.api.getQueue()
if info:
self.api.getPackageData(choice(info).pid)
+
def getAccounts(self):
self.api.getAccounts(False)
+
def getCaptchaTask(self):
self.api.getCaptchaTask(False)