diff --git a/tests/unit/clients/dbt_runner/test_dbt_runner.py b/tests/unit/clients/dbt_runner/test_dbt_runner.py index 929e61f58..587912d97 100644 --- a/tests/unit/clients/dbt_runner/test_dbt_runner.py +++ b/tests/unit/clients/dbt_runner/test_dbt_runner.py @@ -3,7 +3,7 @@ import pytest -from elementary.clients.dbt.factory import create_dbt_runner +from elementary.clients.dbt.subprocess_dbt_runner import SubprocessDbtRunner @pytest.mark.parametrize( @@ -18,7 +18,7 @@ def test_dbt_runner_seed(mock_subprocess_run, command): project_dir = "proj_dir" profiles_dir = "prof_dir" - dbt_runner = create_dbt_runner(project_dir=project_dir, profiles_dir=profiles_dir) + dbt_runner = SubprocessDbtRunner(project_dir=project_dir, profiles_dir=profiles_dir) if command == "seed": dbt_runner.seed() elif command == "snapshot": @@ -49,7 +49,7 @@ def test_dbt_runner_run(mock_subprocess_run, model, full_refresh, dbt_vars): project_dir = "proj_dir" profiles_dir = "prof_dir" expanded_dbt_vars = json.dumps(dbt_vars) - dbt_runner = create_dbt_runner(project_dir=project_dir, profiles_dir=profiles_dir) + dbt_runner = SubprocessDbtRunner(project_dir=project_dir, profiles_dir=profiles_dir) dbt_runner.run(model, full_refresh=full_refresh, vars=dbt_vars) mock_subprocess_run.assert_called() if model is not None: diff --git a/tests/unit/monitor/data_monitoring/test_selector_filter.py b/tests/unit/monitor/data_monitoring/test_selector_filter.py index 1d71fe3bd..b9f1cf78c 100644 --- a/tests/unit/monitor/data_monitoring/test_selector_filter.py +++ b/tests/unit/monitor/data_monitoring/test_selector_filter.py @@ -251,13 +251,17 @@ def anonymous_tracking_mock() -> MockAnonymousTracking: @pytest.fixture(scope="function") def dbt_runner_no_models_mock() -> Generator[MagicMock, None, None]: - with patch("elementary.clients.dbt.dbt_runner.DbtRunner.ls") as mock_ls: + with patch( + "elementary.clients.dbt.command_line_dbt_runner.CommandLineDbtRunner.ls" + ) as mock_ls: mock_ls.return_value = [] yield mock_ls @pytest.fixture(scope="function") def dbt_runner_with_models_mock() -> Generator[MagicMock, None, None]: - with patch("elementary.clients.dbt.dbt_runner.DbtRunner.ls") as mock_ls: + with patch( + "elementary.clients.dbt.command_line_dbt_runner.CommandLineDbtRunner.ls" + ) as mock_ls: mock_ls.return_value = ["node_name_1", "node_name_2"] yield mock_ls