1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
"""
Description: Test stac-validator on --collections (/collections validation).
"""
from stac_validator import stac_validator
def test_validate_collections_remote():
stac_file = "https://earth-search.aws.element84.com/v0/collections"
stac = stac_validator.StacValidate(stac_file, collections=True)
stac.validate_collections()
assert stac.message == [
{
"version": "1.0.0-beta.2",
"path": "https://earth-search.aws.element84.com/v0/collections",
"schema": [
"https://cdn.staclint.com/v1.0.0-beta.1/extension/item-assets.json",
"https://schemas.stacspec.org/v1.0.0-beta.2/collection-spec/json-schema/collection.json",
],
"valid_stac": True,
"asset_type": "COLLECTION",
"validation_method": "default",
},
{
"version": "1.0.0-beta.2",
"path": "https://earth-search.aws.element84.com/v0/collections",
"schema": [
"https://cdn.staclint.com/v1.0.0-beta.1/extension/item-assets.json",
"https://schemas.stacspec.org/v1.0.0-beta.2/collection-spec/json-schema/collection.json",
],
"valid_stac": True,
"asset_type": "COLLECTION",
"validation_method": "default",
},
{
"version": "1.0.0-beta.2",
"path": "https://earth-search.aws.element84.com/v0/collections",
"schema": [
"https://cdn.staclint.com/v1.0.0-beta.1/extension/item-assets.json",
"https://schemas.stacspec.org/v1.0.0-beta.2/collection-spec/json-schema/collection.json",
],
"valid_stac": True,
"asset_type": "COLLECTION",
"validation_method": "default",
},
{
"version": "1.0.0-beta.2",
"path": "https://earth-search.aws.element84.com/v0/collections",
"schema": [
"https://schemas.stacspec.org/v1.0.0-beta.2/collection-spec/json-schema/collection.json"
],
"valid_stac": True,
"asset_type": "COLLECTION",
"validation_method": "default",
},
]
|