File tree Expand file tree Collapse file tree 1 file changed +0
-26
lines changed
packages/toolbox-core/tests Expand file tree Collapse file tree 1 file changed +0
-26
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments