Skip to content

Commit

Permalink
fix: incorrect assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
cliff-lau-cloverhealth committed Sep 25, 2023
1 parent af13013 commit 4588749
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/dbt/test_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import pytest

from cosmos.config import ProfileConfig
from cosmos.constants import ExecutionMode, DbtResourceType
from cosmos.dbt.graph import DbtGraph, LoadMode, CosmosLoadDbtException
from cosmos.constants import DbtResourceType, ExecutionMode
from cosmos.dbt.graph import CosmosLoadDbtException, DbtGraph, LoadMode
from cosmos.dbt.project import DbtProject
from cosmos.profiles import PostgresUserPasswordProfileMapping

Expand Down Expand Up @@ -319,9 +319,9 @@ def test_load_via_dbt_ls_with_non_zero_returncode(mock_popen):
)
with pytest.raises(CosmosLoadDbtException) as err_info:
dbt_graph.load_via_dbt_ls()

expected = "Unable to run dbt deps command due to the error:\nSome stderr message"
assert err_info.value.args[0] == expected
mock_popen.communicate.assert_called_once()


@pytest.mark.integration
Expand All @@ -342,6 +342,7 @@ def test_load_via_dbt_ls_with_runtime_error_in_stdout(mock_popen_communicate):
)
with pytest.raises(CosmosLoadDbtException) as err_info:
dbt_graph.load_via_dbt_ls()

expected = "Unable to run dbt deps command due to the error:\nSome Runtime Error"
assert err_info.value.args[0] == expected
mock_popen_communicate.assert_called_once()
Expand Down

0 comments on commit 4588749

Please sign in to comment.