Skip to content

Commit

Permalink
test_views: parametrize api_version to 1.0, 1.1 and 1.2
Browse files Browse the repository at this point in the history
related to #352
  • Loading branch information
soxofaan committed Jan 8, 2025
1 parent 608a71d commit 7e11fa0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,9 @@

@pytest.fixture(
params=[
"1.0.0",
"1.1.0",
"1.0",
"1.1",
"1.2",
]
)
def api_version(request) -> str:
Expand Down Expand Up @@ -533,7 +534,7 @@ def test_processes(self, api, endpoint):
def test_processes_exclusion(self, api, backend_config_overrides):
resp = api.get('/processes').assert_status_code(200).json
ids = [c["id"] for c in resp["processes"]]
if(api.api_version == "1.0.0"):
if ComparableVersion(api.api_version) == "1.0.0":
assert "merge_cubes" not in ids
else:
assert "merge_cubes" in ids
Expand Down Expand Up @@ -1031,10 +1032,9 @@ def test_collections(self, api):

@pytest.mark.parametrize("backend_config_overrides", [{"collection_exclusion_list": {"1.0.0":["S2_FOOBAR"]}}])
def test_collections_exclusion(self, api, backend_config_overrides):

resp = api.get('/collections').assert_status_code(200).json
ids = [c["id"] for c in resp["collections"]]
if(api.api_version == "1.0.0"):
if ComparableVersion(api.api_version) == "1.0.0":
assert "S2_FOOBAR" not in ids
else:
assert "S2_FOOBAR" in ids
Expand Down

0 comments on commit 7e11fa0

Please sign in to comment.