Adds 8 synchronous psycopg2-based tests that connect as resolutionflow_app and verify the tenant_isolation RLS policies (USING + WITH CHECK) on the two new L1 Phase 1 tables block cross-tenant reads and reject cross-tenant INSERTs. Uses psycopg2 (not asyncpg) to avoid the conftest pytest_runtest_teardown hook that closes the asyncio event loop after every test — incompatible with module-scoped asyncpg fixtures in pytest-asyncio 0.24. conftest.py: extends _RLS_TEST_FILES set to include test_l1_rls.py so it is excluded from the default create_all test suite (requires RUN_RLS_TESTS=1). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
14 KiB
14 KiB