@devries-cameron20 / composio Mirror · read-only / commits / 4cab62caf
Fork 0

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

Mirrored from https://github.com/Camo67/composio.git

Synced Nov 22, 03:15 UTC

test(sdk): add OAuth1 explicit status override tests

Add tests verifying that passing an explicit status in OAuth1 params overrides the auto-detected value, mirroring the existing OAuth2 override tests in both TypeScript and Python.

jkomyno committed Mar 13, 2026 at 02:15 UTC 4cab62caf367b187a53dc87a9a3a1cdb76e7f439
2 files changed +22
python/tests/test_connected_accounts.py
+12
@@ -69,6 +69,18 @@ class TestAuthScheme:
69
70 assert state["val"]["status"] == "INITIALIZING"
71
72 + def test_oauth1_honors_explicit_status_override(self):
73 + scheme = AuthScheme()
74 + state = scheme.oauth1(
75 + {
76 + "oauth_token": "tok",
77 + "oauth_token_secret": "secret",
78 + "status": "INITIALIZING",
79 + }
80 + )
81 +
82 + assert state["val"]["status"] == "INITIALIZING"
83 +
84 @pytest.mark.parametrize(
85 "method_name, expected_auth_scheme, expected_status",
86 [
ts/packages/core/test/AuthConfigs/AuthScheme.test.ts
+10
@@ -165,6 +165,16 @@ describe('AuthScheme', () => {
165
166 expect(result.val.status).toBe(ConnectionStatuses.INITIALIZING);
167 });
168 +
169 + it('should honor explicit status override from user', () => {
170 + const result = AuthScheme.OAuth1({
171 + oauth_token: 'test_token',
172 + oauth_token_secret: 'test_secret',
173 + status: ConnectionStatuses.INITIALIZING,
174 + });
175 +
176 + expect(result.val.status).toBe(ConnectionStatuses.INITIALIZING);
177 + });
178 });
179
180 describe('APIKey', () => {