@@ -220,6 +220,52 @@ def test_pmtiles_link_added(self, mock_fs, mock_ds):
220220 pmtiles_links = [link for link in theme_catalog .links if link .rel == "pmtiles" ]
221221 assert len (pmtiles_links ) == 1
222222
223+ @patch ("overture_stac.overture_stac.ds" )
224+ @patch ("overture_stac.overture_stac.fs" )
225+ def test_child_links_have_titles (self , mock_fs , mock_ds ):
226+ """Verify all child links on theme_catalog include a title field."""
227+ fragments = [
228+ make_mock_fragment (
229+ "bucket/release/theme=places/type=place/part-00000-abc.parquet" ,
230+ num_rows = 50 ,
231+ ),
232+ ]
233+
234+ file_info , dataset = make_mock_theme_type (
235+ "bucket/release/theme=places/type=place" , fragments
236+ )
237+
238+ mock_filesystem = MagicMock ()
239+ mock_filesystem .get_file_info .return_value = [file_info ]
240+ mock_fs .S3FileSystem .return_value = mock_filesystem
241+ mock_ds .dataset .return_value = dataset
242+
243+ theme_catalog , _ , _ , _ = process_theme_worker (
244+ theme_path = "bucket/release/theme=places" ,
245+ release_path = "s3://bucket/release" ,
246+ s3_region = "us-west-2" ,
247+ debug = False ,
248+ release_datetime = datetime (2026 , 4 , 15 ),
249+ release = "2026-04-15.0" ,
250+ available_pmtiles = {},
251+ )
252+
253+ child_links = [link for link in theme_catalog .links if link .rel == "child" ]
254+ assert len (child_links ) > 0 , "theme_catalog should have child links"
255+ for link in child_links :
256+ assert link .title is not None , (
257+ f"Child link { link .href } is missing a title field"
258+ )
259+
260+ # Also verify the theme_catalog itself has a title
261+ assert theme_catalog .title is not None
262+ assert theme_catalog .title == "places"
263+
264+ # Verify collection has a title
265+ collections = list (theme_catalog .get_children ())
266+ assert collections [0 ].title is not None
267+ assert collections [0 ].title == "place"
268+
223269
224270class TestBuildReleaseCatalog :
225271 """Tests for the build_release_catalog method."""
0 commit comments