fix(tests): update expectations for RLS-correct behavior
- test_rls_isolation: add pytestmark for module-scoped event loop to fix "Future attached to a different loop" with pytest-asyncio 0.23 + asyncpg module-scoped fixtures - test_admin_categories_global: global categories use PLATFORM_ACCOUNT_ID not NULL; update stale assertion - test_permissions_account: with RLS, cross-tenant tree access returns 404 (invisible) not 403 (forbidden) — update to match actual behavior Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -200,6 +200,7 @@ class TestAccountPermissions:
|
||||
})
|
||||
outsider_headers = {"Authorization": f"Bearer {outsider_login.json()['access_token']}"}
|
||||
|
||||
# Outsider should NOT see the private tree
|
||||
# Outsider should NOT see the private tree.
|
||||
# With RLS, the tree is invisible to other tenants — 404 not 403.
|
||||
response = await client.get(f"/api/v1/trees/{tree_id}", headers=outsider_headers)
|
||||
assert response.status_code == 403
|
||||
assert response.status_code == 404
|
||||
|
||||
Reference in New Issue
Block a user