Skip to content

Commit 5521f21

Browse files
initialisations, function calls, then assertions
Signed-off-by: varun-edachali-dbx <varun.edachali@databricks.com>
1 parent f96936a commit 5521f21

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

tests/unit/test_client.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,18 +68,15 @@ def test_closing_connection_closes_commands(mock_thrift_client_class, closed):
6868
)
6969
cursor = connection.cursor()
7070

71-
# Verify initial state
72-
assert mock_execute_response.has_been_closed_server_side == closed
73-
assert mock_execute_response.status == initial_state
74-
7571
# Mock execute_command to return our execute response
7672
cursor.thrift_backend.execute_command = Mock(return_value=mock_execute_response)
77-
cursor.execute("SELECT 1")
7873

79-
# Verify that cursor.execute() set up the result set correctly
74+
# Execute a command
75+
cursor.execute("SELECT 1")
76+
77+
# Get the active result set for later assertions
8078
active_result_set = cursor.active_result_set
81-
assert active_result_set.has_been_closed_server_side == closed
82-
79+
8380
# Close the connection
8481
connection.close()
8582

0 commit comments

Comments
 (0)