summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Bahling <sbahling@suse.com>2020-02-13 15:28:00 +0100
committerScott Bahling <sbahling@suse.com>2020-02-13 15:28:00 +0100
commit5b3a2b608c4c4c5d4df4b07d9322279349085dc9 (patch)
tree7ac6b2131e941b264a033b98a7de2c911b125e26
parentb2e96e97ccbe3b6b670a8366dc1ff5ed775deddf (diff)
downloadobsapi-5b3a2b608c4c4c5d4df4b07d9322279349085dc9.tar.gz
obsapi-5b3a2b608c4c4c5d4df4b07d9322279349085dc9.tar.xz
obsapi-5b3a2b608c4c4c5d4df4b07d9322279349085dc9.zip
Make sure build api arguments match order of OBS api path items.
This of course breaks the API, but hopefully we stay consistent from this point forward
-rw-r--r--obsapi/buildapi.py6
-rw-r--r--obsapi/core.py2
-rw-r--r--test/test_obs_build_api.py4
3 files changed, 6 insertions, 6 deletions
diff --git a/obsapi/buildapi.py b/obsapi/buildapi.py
index 19eb96e..27e9124 100644
--- a/obsapi/buildapi.py
+++ b/obsapi/buildapi.py
@@ -16,20 +16,20 @@ class ObsBuildApi(ObsHttpApi):
def __post(self, *args, **kwargs):
return super(ObsBuildApi, self).post(*args, **kwargs)
- def get(self, prj='', repo='', arch='', pkg='', binaryname='',
+ def get(self, prj=None, repo=None, arch=None, pkg=None, binaryname=None,
view=None, binary_get=False, **kwargs):
if binaryname:
binary_get = True
return self.__get(prj, repo, arch, pkg, binaryname,
view=view, binary_get=binary_get, **kwargs)
- def get_builddepinfo(self, prj, pkg, repo, arch):
+ def get_builddepinfo(self, prj, repo, arch, pkg):
return self.__get(prj, repo, arch, '_builddepinfo', package=pkg)
def get_buildconfig(self, prj, repo):
return self.__get(prj, repo, '_buildconfig')
- def get_buildinfo(self, prj, pkg, repo, arch):
+ def get_buildinfo(self, prj, repo, arch, pkg):
return self.__get(prj, repo, arch, pkg, '_buildinfo')
def get_jobhistory(self, prj, repo, arch, pkg=None, code=None, limit=None):
diff --git a/obsapi/core.py b/obsapi/core.py
index 8e17de7..d0ca9e6 100644
--- a/obsapi/core.py
+++ b/obsapi/core.py
@@ -254,7 +254,7 @@ class ObsApi(object):
return self.build.get_buildconfig(prj, repo)
def get_build_info(self, prj, pkg, repo, arch):
- return self.build.get_buildinfo(prj, pkg, repo, arch)
+ return self.build.get_buildinfo(prj, repo, arch, pkg)
def get_nothing_provides(self, prj, pkg, repo, arch):
tree = etree.fromstring(self.get_build_info(prj, pkg, repo, arch))
diff --git a/test/test_obs_build_api.py b/test/test_obs_build_api.py
index ff271ab..573e762 100644
--- a/test/test_obs_build_api.py
+++ b/test/test_obs_build_api.py
@@ -103,7 +103,7 @@ def test_build_get_builddepinfo(requests_mock):
uri = '{}/build/{}/{}/{}/_builddepinfo'.format(buildapi.apiurl, prj, repo, arch)
text = '<builddepinfo></builddepinfo>'
requests_mock.get(uri, text=text)
- xml = buildapi.get_builddepinfo(prj, pkg, repo, arch)
+ xml = buildapi.get_builddepinfo(prj, repo, arch, pkg)
assert xml == text
@@ -133,7 +133,7 @@ def test_build_get_buildinfo(requests_mock):
uri = '{}/build/{}/{}/{}/{}/_buildinfo'.format(buildapi.apiurl, prj, repo, arch, pkg)
text = '<buildinfo></buildinfo>'
requests_mock.get(uri, text=text)
- xml = buildapi.get_buildinfo(prj, pkg, repo, arch)
+ xml = buildapi.get_buildinfo(prj, repo, arch, pkg)
assert xml == text