def test_init_catalog_from_url(stac_cat_url): cat = StacCatalog(stac_cat_url) assert isinstance(cat, intake.catalog.Catalog) assert cat.name == "stac" assert cat.discover()["container"] == "catalog" cat = StacCatalog.from_url(stac_cat_url) assert isinstance(cat, intake.catalog.Catalog) assert cat.name == "stac" assert cat.discover()["container"] == "catalog" # test kwargs are passed through cat = StacCatalog.from_url(stac_cat_url, name="intake-stac-test") assert "intake-stac-test" == cat.name
def test_init_catalog_from_url(stac_cat_url): cat = StacCatalog(stac_cat_url) assert isinstance(cat, intake.catalog.Catalog) assert cat.name == 'stac-catalog' assert cat.discover()['container'] == 'catalog' cat = StacCatalog.from_url(stac_cat_url) assert isinstance(cat, intake.catalog.Catalog) assert cat.name == 'stac-catalog' assert cat.discover()['container'] == 'catalog' # test kwargs are passed through cat = StacCatalog.from_url(stac_cat_url, name='intake-stac-test') assert 'intake-stac-test' == cat.name
def test_init_catalog_from_url(): cat = StacCatalog(cat_url) assert isinstance(cat, intake.catalog.Catalog) assert cat.name == 'stac-catalog' assert cat.discover()['container'] == 'catalog' assert int(cat.metadata['stac_version'][0]) >= 1 cat = StacCatalog.from_url(cat_url) assert isinstance(cat, intake.catalog.Catalog) assert cat.name == 'stac-catalog' assert cat.discover()['container'] == 'catalog' assert int(cat.metadata['stac_version'][0]) >= 1 # test kwargs are passed through cat = StacCatalog.from_url(cat_url, name='intake-stac-test') assert 'intake-stac-test' == cat.name
def cat(stac_cat_url): return StacCatalog.from_url(stac_cat_url)
def intake_stac_cat(): return StacCatalog.from_url(cat_url)