Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2be0c86

Browse files
make mock result set be of type SeaResultSet
Signed-off-by: varun-edachali-dbx <varun.edachali@databricks.com>
1 parent1d515e3 commit2be0c86

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

‎tests/unit/test_sea_backend.py‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
_filter_session_configuration,
1414
)
1515
fromdatabricks.sql.backend.sea.models.baseimportServiceError,StatementStatus
16+
fromdatabricks.sql.backend.sea.result_setimportSeaResultSet
1617
fromdatabricks.sql.backend.typesimportSessionId,CommandId,CommandState,BackendType
1718
fromdatabricks.sql.parameters.nativeimportIntegerParameter,TDbsqlParameter
1819
fromdatabricks.sql.thrift_api.TCLIServiceimportttypes
@@ -703,7 +704,7 @@ def test_results_message_to_execute_response_is_staging_operation(self, sea_clie
703704
deftest_get_catalogs(self,sea_client,sea_session_id,mock_cursor):
704705
"""Test the get_catalogs method."""
705706
# Mock the execute_command method
706-
mock_result_set=Mock()
707+
mock_result_set=Mock(spec=SeaResultSet)
707708
withpatch.object(
708709
sea_client,"execute_command",return_value=mock_result_set
709710
)asmock_execute:
@@ -735,7 +736,7 @@ def test_get_catalogs(self, sea_client, sea_session_id, mock_cursor):
735736
deftest_get_schemas(self,sea_client,sea_session_id,mock_cursor):
736737
"""Test the get_schemas method with various parameter combinations."""
737738
# Mock the execute_command method
738-
mock_result_set=Mock()
739+
mock_result_set=Mock(spec=SeaResultSet)
739740
withpatch.object(
740741
sea_client,"execute_command",return_value=mock_result_set
741742
)asmock_execute:
@@ -884,7 +885,7 @@ def test_get_tables(self, sea_client, sea_session_id, mock_cursor):
884885
deftest_get_columns(self,sea_client,sea_session_id,mock_cursor):
885886
"""Test the get_columns method with various parameter combinations."""
886887
# Mock the execute_command method
887-
mock_result_set=Mock()
888+
mock_result_set=Mock(spec=SeaResultSet)
888889
withpatch.object(
889890
sea_client,"execute_command",return_value=mock_result_set
890891
)asmock_execute:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp