1
1
import json
2
2
import os
3
3
4
+ import yaml
4
5
from data_diff .diff_tables import Algorithm
5
6
from .test_cli import run_datadiff_cli
6
7
@@ -140,7 +141,7 @@ def test_get_models_no_success(self, mock_manifest_parser, mock_run_parser, mock
140
141
mock_run_parser .assert_called_once_with (run_results = {})
141
142
mock_manifest_parser .assert_called_once_with (manifest = {})
142
143
143
- @patch ("data_diff.dbt. yaml.safe_load" )
144
+ @patch ("yaml.safe_load" )
144
145
@patch ("builtins.open" , new_callable = mock_open , read_data = "key:\n value" )
145
146
def test_set_project_dict (self , mock_open , mock_yaml_parse ):
146
147
expected_dict = {"key1" : "value1" }
@@ -152,7 +153,7 @@ def test_set_project_dict(self, mock_open, mock_yaml_parse):
152
153
self .assertEqual (mock_self .project_dict , expected_dict )
153
154
mock_open .assert_called_once_with (PROJECT_FILE )
154
155
155
- @patch ("data_diff.dbt. yaml.safe_load" )
156
+ @patch ("yaml.safe_load" )
156
157
@patch ("builtins.open" , new_callable = mock_open , read_data = "key:\n value" )
157
158
def test_set_connection_snowflake (self , mock_open_file , mock_yaml_parse ):
158
159
expected_driver = "snowflake"
@@ -182,7 +183,7 @@ def test_set_connection_snowflake(self, mock_open_file, mock_yaml_parse):
182
183
mock_open_file .assert_called_once_with (PROFILES_FILE )
183
184
mock_yaml_parse .assert_called_once_with (mock_open_file ())
184
185
185
- @patch ("data_diff.dbt. yaml.safe_load" )
186
+ @patch ("yaml.safe_load" )
186
187
@patch ("builtins.open" , new_callable = mock_open , read_data = "key:\n value" )
187
188
def test_set_connection_snowflake_no_password (self , mock_open_file , mock_yaml_parse ):
188
189
expected_driver = "snowflake"
@@ -205,7 +206,7 @@ def test_set_connection_snowflake_no_password(self, mock_open_file, mock_yaml_pa
205
206
mock_yaml_parse .assert_called_once_with (mock_open_file ())
206
207
self .assertNotIsInstance (mock_self .connection , dict )
207
208
208
- @patch ("data_diff.dbt. yaml.safe_load" )
209
+ @patch ("yaml.safe_load" )
209
210
@patch ("builtins.open" , new_callable = mock_open , read_data = "key:\n value" )
210
211
def test_set_connection_bigquery (self , mock_open_file , mock_yaml_parse ):
211
212
expected_driver = "bigquery"
@@ -239,7 +240,7 @@ def test_set_connection_bigquery(self, mock_open_file, mock_yaml_parse):
239
240
mock_open_file .assert_called_once_with (PROFILES_FILE )
240
241
mock_yaml_parse .assert_called_once_with (mock_open_file ())
241
242
242
- @patch ("data_diff.dbt. yaml.safe_load" )
243
+ @patch ("yaml.safe_load" )
243
244
@patch ("builtins.open" , new_callable = mock_open , read_data = "key:\n value" )
244
245
def test_set_connection_bigquery_not_oauth (self , mock_open_file , mock_yaml_parse ):
245
246
expected_driver = "bigquery"
@@ -271,7 +272,7 @@ def test_set_connection_bigquery_not_oauth(self, mock_open_file, mock_yaml_parse
271
272
mock_yaml_parse .assert_called_once_with (mock_open_file ())
272
273
self .assertNotIsInstance (mock_self .connection , dict )
273
274
274
- @patch ("data_diff.dbt. yaml.safe_load" )
275
+ @patch ("yaml.safe_load" )
275
276
@patch ("builtins.open" , new_callable = mock_open , read_data = "key:\n value" )
276
277
def test_set_connection_key_error (self , mock_open_file , mock_yaml_parse ):
277
278
profiles_dict = {
@@ -298,7 +299,7 @@ def test_set_connection_key_error(self, mock_open_file, mock_yaml_parse):
298
299
mock_yaml_parse .assert_called_once_with (mock_open_file ())
299
300
self .assertNotIsInstance (mock_self .connection , dict )
300
301
301
- @patch ("data_diff.dbt. yaml.safe_load" )
302
+ @patch ("yaml.safe_load" )
302
303
@patch ("builtins.open" , new_callable = mock_open , read_data = "key:\n value" )
303
304
def test_set_connection_not_implemented (self , mock_open_file , mock_yaml_parse ):
304
305
expected_driver = "not_implemented"
0 commit comments