mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-11-14 14:47:19 +00:00
Repos APIs: searching for packages, adding and deleting packages from the repo. #116
This commit is contained in:
1 parent
f1c235f5c5
commit
726f12c537
3 files changed
+244
-3
No files matched your search
@@ -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