Skip to content

Commit

Permalink
fix fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
Roman Schmidt committed Feb 16, 2024
1 parent 42cf874 commit 62dedb7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions openeo_fastapi/client/collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ async def get_collections():
if response.status == 200 and resp.get("collections"):
collections_list = []
for collection_json in resp["collections"]:
if not (
app_settings.STAC_COLLECTIONS_WHITELIST
if (
not app_settings.STAC_COLLECTIONS_WHITELIST
or collection_json["id"]
in app_settings.STAC_COLLECTIONS_WHITELIST
):
Expand Down Expand Up @@ -57,8 +57,8 @@ async def get_collection(collection_id):
) as response:
resp = await response.json()
if response.status == 200 and resp.get("id"):
if not (
app_settings.STAC_COLLECTIONS_WHITELIST
if (
not app_settings.STAC_COLLECTIONS_WHITELIST
or resp["id"] in app_settings.STAC_COLLECTIONS_WHITELIST
):
return Collection(**resp)
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,4 @@ def collections():

@pytest.fixture
def s2a_collection(collections):
return collections[0]
return collections["collections"][0]

0 comments on commit 62dedb7

Please sign in to comment.