From 93ea1392ada327293c8999c6bb3f51f626b6c551 Mon Sep 17 00:00:00 2001 From: BernardWez Date: Tue, 21 Nov 2023 14:47:01 +0100 Subject: [PATCH] Add asset loading test for deselected stream --- .../test_extensions/test_dagster/test_assets.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/test_elx/test_extensions/test_dagster/test_assets.py b/tests/test_elx/test_extensions/test_dagster/test_assets.py index 7d81a67..f4d0526 100644 --- a/tests/test_elx/test_extensions/test_dagster/test_assets.py +++ b/tests/test_elx/test_extensions/test_dagster/test_assets.py @@ -10,3 +10,15 @@ def test_asset_loading(runner: Runner): assets = load_assets(runner) assert len(assets) == 1 assert isinstance(assets[0], AssetsDefinition) + + +def test_asset_loading_with_deselected_stream(runner_with_deselected_stream: Runner): + """ + Test that assets are loaded correctly. + """ + # Verifies that the associated tap has multiple streams + assert len(runner_with_deselected_stream.tap.catalog.streams) == 2 + + assets = load_assets(runner_with_deselected_stream) + assert len(assets) == 1 + assert isinstance(assets[0], AssetsDefinition)