From 29a2f394601df8efd816a418373419dd28e6baf9 Mon Sep 17 00:00:00 2001 From: BernardWez Date: Tue, 21 Nov 2023 18:45:02 +0100 Subject: [PATCH] Update asset loading test --- .../test_extensions/test_dagster/test_assets.py | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) 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 f4d0526..251204f 100644 --- a/tests/test_elx/test_extensions/test_dagster/test_assets.py +++ b/tests/test_elx/test_extensions/test_dagster/test_assets.py @@ -7,18 +7,12 @@ def test_asset_loading(runner: Runner): """ Test that assets are loaded correctly. """ - assets = load_assets(runner) - assert len(assets) == 1 - assert isinstance(assets[0], AssetsDefinition) - + # Verifies that the tap associated with the runner has 2 streams + assert len(runner.tap.catalog.streams) == 2 -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 + # Load assets + assets = load_assets(runner) - assets = load_assets(runner_with_deselected_stream) + # Length of assets should be 1 as one stream is deselected per default assert len(assets) == 1 assert isinstance(assets[0], AssetsDefinition)