Skip to content

Commit e75a009

Browse files
committed
use kwargs
1 parent c20b6a4 commit e75a009

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

tests/test_utils.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,17 @@ class TestActiniaUtils(object):
4141
def test_request_and_check(self):
4242
"""Test request_and_check utils function."""
4343
url = f"{ACTINIA_BASEURL}api/{ACTINIA_VERSION}/version"
44-
resp = request_and_check("GET", url, ACTINIA_AUTH, status_code=200)
44+
resp = request_and_check(
45+
"GET", url, status_code=(200), **{"auth": ACTINIA_AUTH}
46+
)
4547
assert "version" in resp
4648

4749
def test_request_and_check_wrong_url(self):
4850
"""Test request_and_check utils function with ."""
4951
url = f"{ACTINIA_BASEURL}api/{ACTINIA_VERSION}/version_fail"
5052
err_msg = "The requested URL was not found on the server."
5153
with pytest.raises(Exception) as excinfo:
52-
request_and_check("GET", url, ACTINIA_AUTH, status_code=200)
54+
request_and_check("GET", url, status_code=(200), **{"auth": ACTINIA_AUTH})
5355
assert err_msg in str(excinfo.value)
5456

5557
def test_request_and_check_wrong_auth(self):
@@ -58,7 +60,7 @@ def test_request_and_check_wrong_auth(self):
5860
err_msg = "Unauthorized Access"
5961
wrong_auth = ("actinia-gdi", "wrong_pw")
6062
with pytest.raises(Exception) as excinfo:
61-
request_and_check("GET", url, wrong_auth, status_code=200)
63+
request_and_check("GET", url, status_code=(200), **{"auth": wrong_auth})
6264
assert err_msg in str(excinfo.value)
6365

6466
def test_set_job_names(self):

0 commit comments

Comments
 (0)