@@ -463,14 +463,24 @@ def test_apply_data_source(test_registry: Registry):
463463 test_registry .apply_data_source (batch_source , project , commit = False )
464464 test_registry .apply_feature_view (fv1 , project , commit = True )
465465
466- registry_feature_view = test_registry .list_feature_views (project )[0 ]
466+ registry_feature_views = test_registry .list_feature_views (project )
467+ registry_data_sources = test_registry .list_data_sources (project )
468+ assert len (registry_feature_views ) == 1
469+ assert len (registry_data_sources ) == 1
470+ registry_feature_view = registry_feature_views [0 ]
467471 assert registry_feature_view .batch_source == batch_source
472+ registry_data_source = registry_data_sources [0 ]
473+ assert registry_data_source == batch_source
468474
469475 # Check that change to batch source propagates
470476 batch_source .event_timestamp_column = "new_ts_col"
471477 test_registry .apply_data_source (batch_source , project , commit = False )
472478 test_registry .apply_feature_view (fv1 , project , commit = True )
473- registry_feature_view = test_registry .list_feature_views (project )[0 ]
479+ registry_feature_views = test_registry .list_feature_views (project )
480+ registry_data_sources = test_registry .list_data_sources (project )
481+ assert len (registry_feature_views ) == 1
482+ assert len (registry_data_sources ) == 1
483+ registry_feature_view = registry_feature_views [0 ]
474484 assert registry_feature_view .batch_source == batch_source
475485 registry_batch_source = test_registry .list_data_sources (project )[0 ]
476486 assert registry_batch_source == batch_source
0 commit comments