Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.
Prev Previous commit
Next Next commit
formatter
  • Loading branch information
dlawin committed Mar 1, 2023
commit 35a2b6cdac7d0152d3e5ef829c9a5bd6427962fe
1 change: 0 additions & 1 deletion data_diff/dbt.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,6 @@ def _cloud_diff(diff_vars: DiffVars) -> None:


class DbtParser:

def __init__(self, profiles_dir_override: str, project_dir_override: str, is_cloud: bool) -> None:
self.profiles_dir = Path(profiles_dir_override or default_profiles_dir())
self.project_dir = Path(project_dir_override or default_project_dir())
Expand Down
7 changes: 0 additions & 7 deletions tests/test_dbt.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ def test_get_models_bad_lower_dbt_version(self, mock_open):
with self.assertRaises(Exception) as ex:
DbtParser.get_models(mock_self)


mock_open.assert_called_once_with(Path(RUN_RESULTS_PATH))
mock_self.parse_run_results.assert_called_once_with(run_results={})
mock_self.parse_manifest.assert_not_called()
Expand All @@ -105,7 +104,6 @@ def test_get_models_bad_upper_dbt_version(self, mock_open):
with self.assertRaises(Exception) as ex:
DbtParser.get_models(mock_self)


mock_open.assert_called_once_with(Path(RUN_RESULTS_PATH))
mock_self.parse_run_results.assert_called_once_with(run_results={})
mock_self.parse_manifest.assert_not_called()
Expand All @@ -131,7 +129,6 @@ def test_get_models_no_success(self, mock_open):
with self.assertRaises(Exception):
DbtParser.get_models(mock_self)


mock_open.assert_any_call(Path(RUN_RESULTS_PATH))
mock_open.assert_any_call(Path(MANIFEST_PATH))
mock_self.parse_run_results.assert_called_once_with(run_results={})
Expand Down Expand Up @@ -199,7 +196,6 @@ def test_set_connection_snowflake_no_password(self, mock_open_file):
with self.assertRaises(Exception):
DbtParser.set_connection(mock_self)


mock_open_file.assert_called_once_with(Path(PROFILES_FILE))
mock_self.yaml.safe_load.assert_called_once_with(mock_open_file())
self.assertNotIsInstance(mock_self.connection, dict)
Expand Down Expand Up @@ -266,7 +262,6 @@ def test_set_connection_bigquery_not_oauth(self, mock_open_file):
with self.assertRaises(Exception):
DbtParser.set_connection(mock_self)


mock_open_file.assert_called_once_with(Path(PROFILES_FILE))
mock_self.yaml.safe_load.assert_called_once_with(mock_open_file())
self.assertNotIsInstance(mock_self.connection, dict)
Expand Down Expand Up @@ -294,7 +289,6 @@ def test_set_connection_key_error(self, mock_open_file):
with self.assertRaises(Exception):
DbtParser.set_connection(mock_self)


mock_open_file.assert_called_once_with(Path(PROFILES_FILE))
mock_self.yaml.safe_load.assert_called_once_with(mock_open_file())
self.assertNotIsInstance(mock_self.connection, dict)
Expand Down Expand Up @@ -322,7 +316,6 @@ def test_set_connection_not_implemented(self, mock_open_file):
with self.assertRaises(NotImplementedError):
DbtParser.set_connection(mock_self)


mock_open_file.assert_called_once_with(Path(PROFILES_FILE))
mock_self.yaml.safe_load.assert_called_once_with(mock_open_file())
self.assertNotIsInstance(mock_self.connection, dict)
Expand Down