diff options
Diffstat (limited to 'tests/APIExerciser.py')
-rw-r--r-- | tests/APIExerciser.py | 8 |
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) |