Skip to content
This repository has been archived by the owner on Nov 23, 2023. It is now read-only.

Commit

Permalink
fix: Ignore optional title links in tests
Browse files Browse the repository at this point in the history
Pystac offers optional title field in link object (human-readable title to be used in rendered displays of the link). Removing normalized_href (put in place to solve #1818) causes tests to fail due to missing title.
  • Loading branch information
Jimlinz committed Aug 10, 2022
1 parent c0627fd commit 1513861
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions tests/test_populate_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,33 +228,28 @@ def should_update_root_catalog_with_new_version_catalog(subtests: SubTests) -> N
{
STAC_REL_KEY: STAC_REL_ROOT,
STAC_HREF_KEY: f"./{CATALOG_FILENAME}",
STAC_TITLE_KEY: ROOT_CATALOG_TITLE,
STAC_TYPE_KEY: STAC_MEDIA_TYPE_JSON,
},
{
STAC_REL_KEY: STAC_REL_CHILD,
STAC_HREF_KEY: f"./{dataset.title}/{catalog_filename}",
STAC_TITLE_KEY: dataset.title,
STAC_TYPE_KEY: STAC_MEDIA_TYPE_JSON,
},
]
expected_dataset_version_links: JsonList = [
{
STAC_REL_KEY: STAC_REL_ROOT,
STAC_HREF_KEY: f"../{CATALOG_FILENAME}",
STAC_TITLE_KEY: ROOT_CATALOG_TITLE,
STAC_TYPE_KEY: STAC_MEDIA_TYPE_JSON,
},
{
STAC_REL_KEY: STAC_REL_CHILD,
STAC_HREF_KEY: f"./{collection_filename}",
STAC_TITLE_KEY: dataset.title,
STAC_TYPE_KEY: STAC_MEDIA_TYPE_JSON,
},
{
STAC_REL_KEY: STAC_REL_PARENT,
STAC_HREF_KEY: f"../{CATALOG_FILENAME}",
STAC_TITLE_KEY: ROOT_CATALOG_TITLE,
STAC_TYPE_KEY: STAC_MEDIA_TYPE_JSON,
},
]
Expand Down Expand Up @@ -353,21 +348,18 @@ def should_update_root_catalog_with_new_version_collection(subtests: SubTests) -
{
STAC_REL_KEY: STAC_REL_ROOT,
STAC_HREF_KEY: f"./{CATALOG_FILENAME}",
STAC_TITLE_KEY: ROOT_CATALOG_TITLE,
STAC_TYPE_KEY: STAC_MEDIA_TYPE_JSON,
},
{
STAC_REL_KEY: STAC_REL_CHILD,
STAC_HREF_KEY: f"./{dataset.title}/{collection_filename}",
STAC_TITLE_KEY: dataset.title,
STAC_TYPE_KEY: STAC_MEDIA_TYPE_JSON,
},
]
expected_dataset_version_links: JsonList = [
{
STAC_REL_KEY: STAC_REL_ROOT,
STAC_HREF_KEY: f"../{CATALOG_FILENAME}",
STAC_TITLE_KEY: ROOT_CATALOG_TITLE,
STAC_TYPE_KEY: STAC_MEDIA_TYPE_JSON,
},
{
Expand All @@ -378,21 +370,18 @@ def should_update_root_catalog_with_new_version_collection(subtests: SubTests) -
{
STAC_REL_KEY: STAC_REL_PARENT,
STAC_HREF_KEY: f"../{CATALOG_FILENAME}",
STAC_TITLE_KEY: ROOT_CATALOG_TITLE,
STAC_TYPE_KEY: STAC_MEDIA_TYPE_JSON,
},
]
expected_item_links: JsonList = [
{
STAC_REL_KEY: STAC_REL_ROOT,
STAC_HREF_KEY: f"../{CATALOG_FILENAME}",
STAC_TITLE_KEY: ROOT_CATALOG_TITLE,
STAC_TYPE_KEY: STAC_MEDIA_TYPE_JSON,
},
{
STAC_REL_KEY: STAC_REL_PARENT,
STAC_HREF_KEY: f"./{collection_filename}",
STAC_TITLE_KEY: dataset.title,
STAC_TYPE_KEY: STAC_MEDIA_TYPE_JSON,
},
]
Expand Down

0 comments on commit 1513861

Please sign in to comment.