mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-06-06 05:30:57 +00:00
Repos APIs: searching for packages, adding and deleting packages from the repo. #116
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user