Ejemplo n.º 1
0
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
Ejemplo n.º 2
0
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
Ejemplo n.º 3
0
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
Ejemplo n.º 4
0
def test_init_catalog_from_satstac_obj(stac_cat_obj):
    cat = StacCatalog(stac_cat_obj)
    assert isinstance(cat, intake.catalog.Catalog)
    assert cat.discover()["container"] == "catalog"
    assert cat.name == "stac"
    assert cat.name == stac_cat_obj.id

    # test kwargs are passed through
    cat = StacCatalog(stac_cat_obj, name="intake-stac-test")
    assert "intake-stac-test" == cat.name
Ejemplo n.º 5
0
def test_init_catalog_from_pystac_obj(pystac_cat):
    cat = StacCatalog(pystac_cat)
    assert isinstance(cat, intake.catalog.Catalog)
    assert cat.discover()['container'] == 'catalog'
    assert cat.name == 'stac-catalog'
    assert cat.name == pystac_cat.id

    # test kwargs are passed through
    cat = StacCatalog(pystac_cat, name='intake-stac-test')
    assert 'intake-stac-test' == cat.name