コード例 #1
0
 def test_get_table_names_split_views_from_tables_no_tables(
     self, mock_get_view_names, mock_get_table_names, mock_is_feature_enabled
 ):
     mock_get_view_names.return_value = []
     table_names = []
     mock_get_table_names.return_value = table_names
     mock_is_feature_enabled.return_value = True
     tables = PrestoEngineSpec.get_table_names(mock.Mock(), mock.Mock(), None)
     assert tables == []
コード例 #2
0
 def test_get_table_names_split_views_from_tables(
     self, mock_get_view_names, mock_get_table_names, mock_is_feature_enabled
 ):
     mock_get_view_names.return_value = ["view1", "view2"]
     table_names = ["table1", "table2", "view1", "view2"]
     mock_get_table_names.return_value = table_names
     mock_is_feature_enabled.return_value = True
     tables = PrestoEngineSpec.get_table_names(mock.Mock(), mock.Mock(), None)
     assert sorted(tables) == sorted(table_names)