File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
stac_fastapi/elasticsearch/tests/resources Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,20 @@ async def test_returns_valid_collection(ctx, app_client):
8484 collection .validate ()
8585
8686
87+ @pytest .mark .asyncio
88+ async def test_collection_extensions (ctx , app_client ):
89+ """Test that extensions can be used to define additional top-level properties"""
90+ ctx .collection .get ("stac_extensions" , []).append (
91+ "https://stac-extensions.github.io/item-assets/v1.0.0/schema.json"
92+ )
93+ test_asset = {"title" : "test" , "description" : "test" , "type" : "test" }
94+ ctx .collection ["item_assets" ] = {"test" : test_asset }
95+ resp = await app_client .put ("/collections" , json = ctx .collection )
96+
97+ assert resp .status_code == 200
98+ assert resp .json ().get ("item_assets" , {}).get ("test" ) == test_asset
99+
100+
87101@pytest .mark .asyncio
88102async def test_pagination_collection (app_client , ctx , txn_client ):
89103 """Test collection pagination links"""
You can’t perform that action at this time.
0 commit comments