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:
chihlasm
2026-02-08 14:21:29 -05:00
parent b97596d286
commit a027e683e3
5 changed files with 25 additions and 16 deletions

View File

@@ -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",