Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
TypeScript agentic-aiagentsaiai-agentsaiagentsdeveloper-toolsfunction-callinggpt-4javascriptjsllmllmopsmcppythonremote-mcp-serverssetypescript
test(connected-accounts,py): patch time.time defensively in terminal-state test
jkomyno27a4e6448e08
diff --git a/python/tests/test_connected_accounts.py b/python/tests/test_connected_accounts.pyindex 4092ad7fa..cbaf62f3a 100644--- a/python/tests/test_connected_accounts.py+++ b/python/tests/test_connected_accounts.py@@ -194,6 +194,18 @@ class TestConnectionRequest:client=mock_client,)+ # Defensively patch `time.time` (matches sibling tests at lines 137,+ # 170): a stuck CI runner could otherwise reach the deadline before+ # the first retrieve call lands, masking the SDKError assertion as a+ # ComposioSDKTimeoutError.+ current_time = {"value": 0.0}++ def fake_time():+ value = current_time["value"]+ current_time["value"] += 0.1+ return value++ monkeypatch.setattr(time, "time", fake_time)monkeypatch.setattr(time, "sleep", lambda *_args, **_kwargs: None)with pytest.raises(exceptions.SDKError) as excinfo: