Skip to content

Commit 7e11fa0

Browse files
committed
test_views: parametrize api_version to 1.0, 1.1 and 1.2
related to #352
1 parent 608a71d commit 7e11fa0

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

tests/test_views.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,9 @@
8484

8585
@pytest.fixture(
8686
params=[
87-
"1.0.0",
88-
"1.1.0",
87+
"1.0",
88+
"1.1",
89+
"1.2",
8990
]
9091
)
9192
def api_version(request) -> str:
@@ -533,7 +534,7 @@ def test_processes(self, api, endpoint):
533534
def test_processes_exclusion(self, api, backend_config_overrides):
534535
resp = api.get('/processes').assert_status_code(200).json
535536
ids = [c["id"] for c in resp["processes"]]
536-
if(api.api_version == "1.0.0"):
537+
if ComparableVersion(api.api_version) == "1.0.0":
537538
assert "merge_cubes" not in ids
538539
else:
539540
assert "merge_cubes" in ids
@@ -1031,10 +1032,9 @@ def test_collections(self, api):
10311032

10321033
@pytest.mark.parametrize("backend_config_overrides", [{"collection_exclusion_list": {"1.0.0":["S2_FOOBAR"]}}])
10331034
def test_collections_exclusion(self, api, backend_config_overrides):
1034-
10351035
resp = api.get('/collections').assert_status_code(200).json
10361036
ids = [c["id"] for c in resp["collections"]]
1037-
if(api.api_version == "1.0.0"):
1037+
if ComparableVersion(api.api_version) == "1.0.0":
10381038
assert "S2_FOOBAR" not in ids
10391039
else:
10401040
assert "S2_FOOBAR" in ids

0 commit comments

Comments
 (0)