diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index 311214f6..0c7d3ffa 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -63,6 +63,7 @@ else: # Set test environment variables before importing the app os.environ.update(test_env) +os.environ.pop("ADMIN_PASSWORD", None) from routstr.core.db import ApiKey, get_session # noqa: E402 from routstr.core.main import app, lifespan # noqa: E402 diff --git a/tests/integration/test_general_info_endpoints.py b/tests/integration/test_general_info_endpoints.py index f9d52c25..cfde36e1 100644 --- a/tests/integration/test_general_info_endpoints.py +++ b/tests/integration/test_general_info_endpoints.py @@ -271,36 +271,23 @@ async def test_models_endpoint_accept_headers(integration_client: AsyncClient) - async def test_admin_endpoint_unauthenticated( integration_client: AsyncClient, db_snapshot: Any ) -> None: - """Test GET /admin/ endpoint without authentication""" - - # Capture initial database state + """Test GET /admin/ endpoint without authentication shows setup form""" await db_snapshot.capture() response = await integration_client.get("/admin/") - # Should return 200 with login form (not 401/403) assert response.status_code == 200 assert "text/html" in response.headers["content-type"] - # Response should be HTML html_content = response.text assert "" in html_content assert "" in html_content + assert "