Skip to content

Collections extension test broken as of stac-fastapi v2.5.5 #238

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jonhealy1 opened this issue May 2, 2024 · 2 comments
Closed

Collections extension test broken as of stac-fastapi v2.5.5 #238

jonhealy1 opened this issue May 2, 2024 · 2 comments

Comments

@jonhealy1
Copy link
Collaborator

@pytest.mark.skip(reason="Broken as of stac-fastapi v2.5.5")
@pytest.mark.asyncio
async def test_collection_extensions(ctx, app_client):
"""Test that extensions can be used to define additional top-level properties"""
ctx.collection.get("stac_extensions", []).append(
"https://stac-extensions.github.io/item-assets/v1.0.0/schema.json"
)
test_asset = {"title": "test", "description": "test", "type": "test"}
ctx.collection["item_assets"] = {"test": test_asset}
resp = await app_client.put(
f"/collections/{ctx.collection['id']}", json=ctx.collection
)
assert resp.status_code == 200
assert resp.json().get("item_assets", {}).get("test") == test_asset

@jonhealy1
Copy link
Collaborator Author

The extension adds a item_assets field to a collection. I can create a collection with the field and then GET that collection back and the field still exists but pushing the same collection through a PUT request erases the field.

@jonhealy1
Copy link
Collaborator Author

jonhealy1 commented May 7, 2024

Test passes now here #234 with stac-fastapi v3.0.0a

jonhealy1 added a commit that referenced this issue May 10, 2024
**Related Issue(s):**

- #238 
- #247 
- #249 
- stac-utils/stac-fastapi-pgstac#108
- stac-utils/stac-fastapi#685
- stac-utils/stac-fastapi#687
- stac-utils/stac-fastapi#690
- 

**Description:**

Update stac-fastapi parent libraries to v3.0.0a. There are quite a few
changes made in this pr.

**PR Checklist:**

- [x] Code is formatted and linted (run `pre-commit run --all-files`)
- [x] Tests pass (run `make test`)
- [x] Documentation has been updated to reflect changes, if applicable
- [x] Changes are added to the changelog

---------

Co-authored-by: pedro-cf <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant