Skip to content

Commit 68ac437

Browse files
remove accidentally removed test
Signed-off-by: varun-edachali-dbx <varun.edachali@databricks.com>
1 parent f233886 commit 68ac437

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

tests/unit/test_sea_backend.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,31 @@ def test_utility_methods(self, sea_client):
637637
sea_client._extract_description_from_manifest(no_columns_manifest) is None
638638
)
639639

640+
def test_results_message_to_execute_response_is_staging_operation(self, sea_client):
641+
"""Test that is_staging_operation is correctly set from manifest.is_volume_operation."""
642+
# Test when is_volume_operation is True
643+
response = MagicMock()
644+
response.statement_id = "test-statement-123"
645+
response.status.state = CommandState.SUCCEEDED
646+
response.manifest.is_volume_operation = True
647+
response.manifest.result_compression = "NONE"
648+
response.manifest.format = "JSON_ARRAY"
649+
650+
# Mock the _extract_description_from_manifest method to return None
651+
with patch.object(
652+
sea_client, "_extract_description_from_manifest", return_value=None
653+
):
654+
result = sea_client._results_message_to_execute_response(response)
655+
assert result.is_staging_operation is True
656+
657+
# Test when is_volume_operation is False
658+
response.manifest.is_volume_operation = False
659+
with patch.object(
660+
sea_client, "_extract_description_from_manifest", return_value=None
661+
):
662+
result = sea_client._results_message_to_execute_response(response)
663+
assert result.is_staging_operation is False
664+
640665
def test_get_catalogs(self, sea_client, sea_session_id, mock_cursor):
641666
"""Test the get_catalogs method."""
642667
# Mock the execute_command method

0 commit comments

Comments
 (0)