Skip to content

Commit 658c635

Browse files
author
anikaweinmann
committed
fixes
1 parent 1e8204b commit 658c635

2 files changed

Lines changed: 13 additions & 5 deletions

File tree

src/actinia/utils.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,14 @@ def create_actinia_pc_item(
8787
some valid GRASS or actinia module
8888
inputs: list or dict
8989
list of input parameters with values in the form
90-
[{"param": key1, "value": value1}, {"param": key2, "value": value2}, ...]
90+
[{"param": key1, "value": value1}, {"param": key2, "value": value2},
91+
...]
9192
shorter alternative as dict
9293
{"key1": value1, "key2": value2, ...}
9394
outputs: list or dict
9495
list of output parameters with values in the form
95-
[{"param": key1, "value": value1}, {"param": key2, "value": value2}, ...]
96+
[{"param": key1, "value": value1}, {"param": key2, "value": value2},
97+
...]
9698
shorter alternative as dict
9799
{"key1": value1, "key2": value2, ...}
98100
flags: str

tests/test_utils.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,13 @@
2727
__copyright__ = "Copyright 2023, mundialis GmbH & Co. KG"
2828
__maintainer__ = "Anika Weinmann"
2929

30-
from actinia.utils import *
30+
import pytest
31+
32+
from actinia.utils import (
33+
create_actinia_pc_item,
34+
request_and_check,
35+
set_job_names,
36+
)
3137
from .actinia_config import ACTINIA_BASEURL, ACTINIA_VERSION, ACTINIA_AUTH
3238

3339

@@ -43,7 +49,7 @@ def test_request_and_check_wrong_url(self):
4349
url = f"{ACTINIA_BASEURL}api/{ACTINIA_VERSION}/version_fail"
4450
err_msg = "The requested URL was not found on the server."
4551
with pytest.raises(Exception) as excinfo:
46-
resp = request_and_check(url, ACTINIA_AUTH, status_code=200)
52+
request_and_check(url, ACTINIA_AUTH, status_code=200)
4753
assert err_msg in str(excinfo.value)
4854

4955
def test_request_and_check_wrong_auth(self):
@@ -52,7 +58,7 @@ def test_request_and_check_wrong_auth(self):
5258
err_msg = "Unauthorized Access"
5359
wrong_auth = ("actinia-gdi", "wrong_pw")
5460
with pytest.raises(Exception) as excinfo:
55-
resp = request_and_check(url, wrong_auth, status_code=200)
61+
request_and_check(url, wrong_auth, status_code=200)
5662
assert err_msg in str(excinfo.value)
5763

5864
def test_set_job_names(self):

0 commit comments

Comments
 (0)