(self)
| 91 | #sleep(random() / 500) |
| 92 | |
| 93 | def testAPI(self): |
| 94 | global sumCalled |
| 95 | |
| 96 | m = ["statusDownloads", "statusServer", "addPackage", "getPackageData", "getFileData", "deleteFiles", |
| 97 | "deletePackages", "getQueue", "getCollector", "getQueueData", "getCollectorData", "isCaptchaWaiting", |
| 98 | "getCaptchaTask", "stopAllDownloads", "getAllInfo", "getServices" , "getAccounts", "getAllUserData"] |
| 99 | |
| 100 | method = choice(m) |
| 101 | #print "Testing:", method |
| 102 | |
| 103 | if hasattr(self, method): |
| 104 | res = getattr(self, method)() |
| 105 | else: |
| 106 | res = getattr(self.api, method)() |
| 107 | |
| 108 | self.count += 1 |
| 109 | sumCalled += 1 |
| 110 | |
| 111 | #print res |
| 112 | |
| 113 | def addPackage(self): |
| 114 | name = "".join(sample(string.ascii_letters, 10)) |
no outgoing calls