mirror of
https://github.com/stijndcl/didier.git
synced 2026-04-07 23:55:46 +02:00
Fix mongo connection
This commit is contained in:
parent
9abe5dd519
commit
52b452c85a
16 changed files with 53 additions and 38 deletions
|
|
@ -5,7 +5,7 @@ from unittest.mock import MagicMock
|
|||
import pytest
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
|
||||
from database.engine import engine
|
||||
from database.engine import postgres_engine
|
||||
from database.migrations import ensure_latest_migration, migrate
|
||||
from didier import Didier
|
||||
|
||||
|
|
@ -40,7 +40,7 @@ async def postgres(tables) -> AsyncGenerator[AsyncSession, None]:
|
|||
|
||||
Rollbacks the transaction afterwards so that the future tests start with a clean database
|
||||
"""
|
||||
connection = await engine.connect()
|
||||
connection = await postgres_engine.connect()
|
||||
transaction = await connection.begin()
|
||||
session = AsyncSession(bind=connection, expire_on_commit=False)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue