Skip to content

Commit 50d6e8d

Browse files
committed
chore: Delint
1 parent 4945c4f commit 50d6e8d

File tree

1 file changed

+12
-16
lines changed

1 file changed

+12
-16
lines changed

packages/toolbox-core/tests/test_sync_client.py

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -162,15 +162,9 @@ def mock_tool_invoke(
162162
def test_sync_client_initialization_and_loop_management():
163163
"""Tests that the event loop and thread are managed correctly at class level."""
164164
client1 = ToolboxSyncClient(TEST_BASE_URL)
165-
assert (
166-
client1._ToolboxSyncClient__loop is not None
167-
), "Loop should be created"
168-
assert (
169-
client1._ToolboxSyncClient__thread is not None
170-
), "Thread should be created"
171-
assert (
172-
client1._ToolboxSyncClient__thread.is_alive()
173-
), "Thread should be running"
165+
assert client1._ToolboxSyncClient__loop is not None, "Loop should be created"
166+
assert client1._ToolboxSyncClient__thread is not None, "Thread should be created"
167+
assert client1._ToolboxSyncClient__thread.is_alive(), "Thread should be running"
174168
assert isinstance(
175169
client1._ToolboxSyncClient__async_client, ToolboxClient
176170
), "Async client should be ToolboxClient instance"
@@ -180,9 +174,7 @@ def test_sync_client_initialization_and_loop_management():
180174

181175
client2 = ToolboxSyncClient(TEST_BASE_URL) # Should reuse existing loop/thread
182176
assert client2._ToolboxSyncClient__loop is loop1, "Loop should be reused"
183-
assert (
184-
client2._ToolboxSyncClient__thread is thread1
185-
), "Thread should be reused"
177+
assert client2._ToolboxSyncClient__thread is thread1, "Thread should be reused"
186178
assert isinstance(client2._ToolboxSyncClient__async_client, ToolboxClient)
187179

188180
client1.close() # Closes its async_client's session
@@ -471,7 +463,6 @@ def expected_header_token(self): # Renamed to avoid clash
471463
def tool_name_auth(self): # Renamed
472464
return "sync_auth_tool1"
473465

474-
475466
def test_auth_with_load_tool_success(
476467
self,
477468
tool_name_auth,
@@ -489,7 +480,9 @@ def test_auth_with_load_tool_success(
489480
)
490481

491482
def require_headers_callback(url, **kwargs):
492-
assert kwargs["headers"].get("my-auth-service_token") == expected_header_token
483+
assert (
484+
kwargs["headers"].get("my-auth-service_token") == expected_header_token
485+
)
493486
return CallbackResult(status=200, payload={"result": "auth_ok"})
494487

495488
aioresponses.post(
@@ -526,7 +519,9 @@ def test_auth_with_add_token_success(
526519
)
527520

528521
def require_headers_callback(url, **kwargs):
529-
assert kwargs["headers"].get("my-auth-service_token") == expected_header_token
522+
assert (
523+
kwargs["headers"].get("my-auth-service_token") == expected_header_token
524+
)
530525
return CallbackResult(status=200, payload={"result": "auth_ok"})
531526

532527
aioresponses.post(
@@ -575,7 +570,8 @@ def test_auth_with_load_tool_fail_no_token(
575570
tool = client.load_tool(tool_name_auth)
576571
# Invocation should fail
577572
with pytest.raises(
578-
ValueError, match="One or more of the following authn services are required to invoke this tool: my-auth-service"
573+
ValueError,
574+
match="One or more of the following authn services are required to invoke this tool: my-auth-service",
579575
): # Match error from server
580576
tool(argA=15, argB=True)
581577

0 commit comments

Comments
 (0)