@@ -721,47 +721,6 @@ def test_diff_is_not_cloud(self, mock_print, mock_dbt_parser, mock_cloud_diff, m
721721 mock_local_diff .assert_called_once_with (diff_vars )
722722 mock_print .assert_not_called ()
723723
724- @patch ("data_diff.dbt._get_diff_vars" )
725- @patch ("data_diff.dbt._local_diff" )
726- @patch ("data_diff.dbt._cloud_diff" )
727- @patch ("data_diff.dbt_parser.DbtParser.__new__" )
728- @patch ("data_diff.dbt.rich.print" )
729- def test_diff_no_prod_configs (
730- self , mock_print , mock_dbt_parser , mock_cloud_diff , mock_local_diff , mock_get_diff_vars
731- ):
732- connection = {}
733- threads = None
734- where = "a_string"
735- expected_dbt_vars_dict = {
736- "datasource_id" : 1 ,
737- }
738- mock_dbt_parser_inst = Mock ()
739- mock_dbt_parser .return_value = mock_dbt_parser_inst
740- mock_model = Mock ()
741- mock_dbt_parser_inst .get_models .return_value = [mock_model ]
742- mock_dbt_parser_inst .get_datadiff_variables .return_value = expected_dbt_vars_dict
743-
744- diff_vars = TDiffVars (
745- dev_path = ["dev" ],
746- prod_path = ["prod" ],
747- primary_keys = ["pks" ],
748- connection = connection ,
749- threads = threads ,
750- where_filter = where ,
751- include_columns = [],
752- exclude_columns = [],
753- )
754- mock_get_diff_vars .return_value = diff_vars
755- with self .assertRaises (ValueError ):
756- dbt_diff (is_cloud = False )
757-
758- mock_dbt_parser_inst .get_models .assert_called_once ()
759- mock_dbt_parser_inst .set_connection .assert_called_once ()
760- mock_dbt_parser_inst .get_primary_keys .assert_not_called ()
761- mock_cloud_diff .assert_not_called ()
762- mock_local_diff .assert_not_called ()
763- mock_print .assert_not_called ()
764-
765724 @patch ("data_diff.dbt._get_diff_vars" )
766725 @patch ("data_diff.dbt._local_diff" )
767726 @patch ("data_diff.dbt._cloud_diff" )
@@ -832,13 +791,12 @@ def test_diff_only_prod_schema(
832791 exclude_columns = [],
833792 )
834793 mock_get_diff_vars .return_value = diff_vars
835- with self .assertRaises (ValueError ):
836- dbt_diff (is_cloud = False )
794+ dbt_diff (is_cloud = False )
837795
838796 mock_dbt_parser_inst .get_models .assert_called_once ()
839797 mock_dbt_parser_inst .set_connection .assert_called_once ()
840798 mock_cloud_diff .assert_not_called ()
841- mock_local_diff .assert_called_once_with (expected_diff_vars )
799+ mock_local_diff .assert_called_once_with (diff_vars )
842800 mock_print .assert_not_called ()
843801
844802 @patch ("data_diff.dbt._initialize_api" )
0 commit comments