We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 21906a0 commit 83c58afCopy full SHA for 83c58af
tests/test_item.py
@@ -607,3 +607,19 @@ def test_resolve_collection_with_root(
607
root = read_collection.get_root()
608
assert root
609
assert root.id == "root"
610
+
611
612
+def test_non_hierarchical_relative_link() -> None:
613
+ root = pystac.Catalog("root", "root")
614
+ a = pystac.Catalog("a", "a")
615
+ b = pystac.Catalog("b", "b")
616
617
+ root.add_child(a)
618
+ root.add_child(b)
619
+ a.add_link(pystac.Link("related", b))
620
621
+ root.catalog_type = pystac.catalog.CatalogType.SELF_CONTAINED
622
+ root.normalize_hrefs("test_output")
623
+ related_href = [link for link in a.links if link.rel == "related"][0].get_href()
624
625
+ assert related_href is not None and not is_absolute_href(related_href)
0 commit comments