Skip to content

Commit 5d42120

Browse files
committed
chore: Remove now unnecessary fixture
1 parent b1d8c6b commit 5d42120

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

packages/toolbox-core/tests/test_sync_client.py

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -605,29 +605,3 @@ def test_constructor_getters_missing_fail(
605605
tool_name_auth,
606606
auth_token_getters={UNUSED_AUTH_SERVICE: lambda: "token"},
607607
)
608-
609-
610-
# --- Tests for @property methods of ToolboxSyncClient ---
611-
612-
613-
@pytest.fixture
614-
def sync_client_with_mocks() -> Generator[ToolboxSyncClient, Any, Any]:
615-
"""
616-
Fixture to create a ToolboxSyncClient with mocked internal async client
617-
without relying on actual network calls during init.
618-
"""
619-
with patch(
620-
"toolbox_core.sync_client.ToolboxClient", autospec=True
621-
) as MockToolboxClient:
622-
# Mock the async client's constructor to return an AsyncMock instance
623-
mock_async_client_instance = AsyncMock(spec=ToolboxClient)
624-
MockToolboxClient.return_value = mock_async_client_instance
625-
626-
# Mock the run_coroutine_threadsafe and its result()
627-
with patch("asyncio.run_coroutine_threadsafe") as mock_run_coroutine_threadsafe:
628-
mock_future = Mock()
629-
mock_future.result.return_value = mock_async_client_instance
630-
mock_run_coroutine_threadsafe.return_value = mock_future
631-
632-
client = ToolboxSyncClient(TEST_BASE_URL)
633-
yield client

0 commit comments

Comments
 (0)