File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
stac_fastapi/tests/resources Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -107,9 +107,26 @@ async def test_returns_valid_collection(ctx, app_client):
107
107
collection .validate ()
108
108
109
109
110
- @pytest .mark .skip (reason = "Broken as of stac-fastapi v2.5.5" )
111
110
@pytest .mark .asyncio
112
111
async def test_collection_extensions (ctx , app_client ):
112
+ """Test that extensions can be used to define additional top-level properties"""
113
+ ctx .collection .get ("stac_extensions" , []).append (
114
+ "https://stac-extensions.github.io/item-assets/v1.0.0/schema.json"
115
+ )
116
+ test_asset = {"title" : "test" , "description" : "test" , "type" : "test" }
117
+ ctx .collection ["item_assets" ] = {"test" : test_asset }
118
+ ctx .collection ["id" ] = "test-item-assets"
119
+ resp = await app_client .post ("/collections" , json = ctx .collection )
120
+
121
+ assert resp .status_code == 200
122
+ assert resp .json ().get ("item_assets" , {}).get ("test" ) == test_asset
123
+
124
+
125
+ @pytest .mark .skip (
126
+ reason = "Broken as of stac-fastapi v2.5.5, the PUT collections route is not allowing the item_assets field to persist."
127
+ )
128
+ @pytest .mark .asyncio
129
+ async def test_collection_extensions_with_put (ctx , app_client ):
113
130
"""Test that extensions can be used to define additional top-level properties"""
114
131
ctx .collection .get ("stac_extensions" , []).append (
115
132
"https://stac-extensions.github.io/item-assets/v1.0.0/schema.json"
You can’t perform that action at this time.
0 commit comments