Repos APIs: searching for packages, adding and deleting packages from the repo. #116

This commit is contained in:
Andrey Smirnov committed 2014-11-18 00:50:59 +03:00
1 parent f1c235f5c5
commit 726f12c537
3 files changed
+244 -3

No files matched your search

+5
View File
@@ -48,6 +48,11 @@ class APITest(BaseTest):
return requests.post("http://%s%s" % (self.base_url, uri), *args, **kwargs)
def delete(self, uri, *args, **kwargs):
if "json" in kwargs:
kwargs["data"] = json.dumps(kwargs.pop("json"))
if not "headers" in kwargs:
kwargs["headers"] = {}
kwargs["headers"]["Content-Type"] = "application/json"
return requests.delete("http://%s%s" % (self.base_url, uri), *args, **kwargs)
def upload(self, uri, *filenames, **kwargs):