test: update test suite for SQLAlchemy 2.0 migration

- Add session fixture for async session management
- Update all test files to use session parameter
- Convert Core-style queries to ORM-style in tests
- Fix controller calls to include session parameter
- Remove obsolete get_database() references

Test progress: 108/195 tests passing
This commit is contained in:
2025-09-18 12:35:51 -06:00
parent 06639d4d8f
commit 45d1608950
8 changed files with 163 additions and 131 deletions

View File

@@ -84,6 +84,14 @@ async def setup_database(postgres_service):
await async_engine.dispose()
@pytest.fixture
async def session():
from reflector.db import get_session_factory
async with get_session_factory()() as session:
yield session
@pytest.fixture
def dummy_processors():
with (