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:
@@ -38,7 +38,8 @@ class TestTrees:
|
||||
"id": "check_cable",
|
||||
"type": "solution",
|
||||
"title": "Check Network Cable",
|
||||
"description": "Verify the network cable is connected"
|
||||
"description": "Verify the network cable is connected",
|
||||
"solution": "Check and reseat the network cable"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -189,7 +190,8 @@ class TestTrees:
|
||||
"id": "root",
|
||||
"type": "solution",
|
||||
"title": "Private",
|
||||
"description": "Private tree"
|
||||
"description": "Private tree",
|
||||
"solution": "Private solution"
|
||||
},
|
||||
"is_public": False,
|
||||
"is_default": False
|
||||
@@ -220,7 +222,8 @@ class TestTrees:
|
||||
"id": "root",
|
||||
"type": "solution",
|
||||
"title": "Test",
|
||||
"description": "Test tree"
|
||||
"description": "Test tree",
|
||||
"solution": "Test solution"
|
||||
}
|
||||
}
|
||||
create_resp = await client.post("/api/v1/trees", json=tree_data, headers=auth_headers)
|
||||
@@ -337,7 +340,8 @@ class TestTrees:
|
||||
"id": "root",
|
||||
"type": "solution",
|
||||
"title": "Test",
|
||||
"description": "Test tree"
|
||||
"description": "Test tree",
|
||||
"solution": "Test solution"
|
||||
}
|
||||
response = await client.post("/api/v1/trees", json=tree_data, headers=auth_headers)
|
||||
assert response.status_code == 201
|
||||
|
||||
Reference in New Issue
Block a user