summaryrefslogtreecommitdiff
path: root/test/test_api.py
diff options
context:
space:
mode:
authorScott Bahling <sbahling@suse.com>2020-02-03 12:47:04 +0100
committerScott Bahling <sbahling@suse.com>2020-02-03 12:47:04 +0100
commit6cab37af73e130086b05ec875bda5f35d91a100b (patch)
tree0c1af1da440c6032ee7b86f52701a3565d1018e5 /test/test_api.py
parent1fa06716db77c8b73ca6dc7463220fea92994004 (diff)
downloadobsapi-6cab37af73e130086b05ec875bda5f35d91a100b.tar.gz
obsapi-6cab37af73e130086b05ec875bda5f35d91a100b.tar.xz
obsapi-6cab37af73e130086b05ec875bda5f35d91a100b.zip
Reorder arguments to be consistent with get_repo_flags
Diffstat (limited to 'test/test_api.py')
-rw-r--r--test/test_api.py32
1 files changed, 16 insertions, 16 deletions
diff --git a/test/test_api.py b/test/test_api.py
index 52c6796..c8e40b2 100644
--- a/test/test_api.py
+++ b/test/test_api.py
@@ -544,20 +544,20 @@ def test_set_flag(requests_mock, target, flag, status, repository, arch):
else:
matcher = re.compile(r'/source/.+/[^/]*\?')
requests_mock.post(matcher)
- params = dict(cmd='set_flag',
- flag=flag,
- status=status,
- repository=repository,
- arch=arch)
+ flag = dict(flag=flag,
+ status=status,
+ repository=repository,
+ arch=arch)
if target == 'project':
- response = api.set_flag(prj, flag=params)
+ response = api.set_flag(flag, prj)
else:
- response = api.set_flag(prj, pkg, flag=params)
+ response = api.set_flag(flag, prj, pkg)
assert response.status_code == 200
url = requests_mock.request_history[0].url
- check_url_query_params(url, params)
+ flag['cmd'] = 'set_flag'
+ check_url_query_params(url, flag)
# POST /source/<project>?cmd=remove_flag&repository=:opt&arch=:opt&flag=flag
@@ -573,17 +573,17 @@ def test_remove_flag(requests_mock, target, flag, status, repository, arch):
else:
matcher = re.compile(r'/source/.+/[^/]*\?')
requests_mock.post(matcher)
- params = dict(cmd='remove_flag',
- flag=flag,
- status=status,
- repository=repository,
- arch=arch)
+ flag = dict(flag=flag,
+ status=status,
+ repository=repository,
+ arch=arch)
if target == 'project':
- response = api.remove_flag(prj, flag=params)
+ response = api.remove_flag(flag, prj)
else:
- response = api.remove_flag(prj, pkg, flag=params)
+ response = api.remove_flag(flag, prj, pkg)
assert response.status_code == 200
url = requests_mock.request_history[0].url
- check_url_query_params(url, params)
+ flag['cmd'] = 'remove_flag'
+ check_url_query_params(url, flag)