fix: repair all test fixtures - add missing solution fields and fix httpx API
- Add missing `solution` field to solution-type nodes in test tree structures (required by `can_publish_tree` validation for published trees) - Fix `AsyncClient(app=...)` → `ASGITransport(app=...)` in test_save_session_as_tree (httpx deprecated the `app` parameter in favor of transport) - All 189 tests now pass (was 84 passed, 1 failed) Files fixed: conftest.py, test_permissions_account.py, test_subscription_limits.py, test_trees.py, test_save_session_as_tree.py Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -362,8 +362,8 @@ class TestSaveSessionAsTreeAPI:
|
||||
await test_db.refresh(session)
|
||||
|
||||
# Try to save the session as test_user (should fail - filtered by user_id)
|
||||
from httpx import AsyncClient
|
||||
async with AsyncClient(app=client._transport.app, base_url="http://test") as test_client: # type: ignore
|
||||
from httpx import AsyncClient, ASGITransport
|
||||
async with AsyncClient(transport=ASGITransport(app=client._transport.app), base_url="http://test") as test_client: # type: ignore
|
||||
# Login as test_user
|
||||
login_response = await test_client.post(
|
||||
"/api/v1/auth/login",
|
||||
|
||||
Reference in New Issue
Block a user