From e702d77cdf6f7676067cfd33247615cc76f7548d Mon Sep 17 00:00:00 2001 From: Zamil Majdy Date: Fri, 23 Jan 2026 21:25:41 -0600 Subject: [PATCH] Revert "fix(backend): resolve OAuth test event loop issue" This reverts commit 25d9dbac839253fcbd39beedb9c16dc6bd241a9f. --- autogpt_platform/backend/backend/api/features/oauth_test.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/autogpt_platform/backend/backend/api/features/oauth_test.py b/autogpt_platform/backend/backend/api/features/oauth_test.py index e5e092634a..5f6b85a88a 100644 --- a/autogpt_platform/backend/backend/api/features/oauth_test.py +++ b/autogpt_platform/backend/backend/api/features/oauth_test.py @@ -122,7 +122,7 @@ def pkce_credentials() -> tuple[str, str]: return generate_pkce() -@pytest.fixture(scope="function") +@pytest.fixture async def client(server, test_user: str) -> AsyncGenerator[httpx.AsyncClient, None]: """ Create an async HTTP client that talks directly to the FastAPI app. @@ -132,8 +132,6 @@ async def client(server, test_user: str) -> AsyncGenerator[httpx.AsyncClient, No Depends on `server` to ensure the DB is connected and `test_user` to ensure the user exists in the database before running tests. - - Scoped to function to avoid event loop conflicts when running full test suite. """ from autogpt_libs.auth import get_user_id @@ -148,11 +146,9 @@ async def client(server, test_user: str) -> AsyncGenerator[httpx.AsyncClient, No app.dependency_overrides[get_user_id] = override_get_user_id try: - # Create fresh client for each test to avoid event loop binding issues async with httpx.AsyncClient( transport=httpx.ASGITransport(app=app), base_url="http://test", - timeout=30.0, # Add explicit timeout ) as http_client: yield http_client finally: