mirror of
https://github.com/Monadical-SAS/reflector.git
synced 2025-12-21 04:39:06 +00:00
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:
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user