mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-23 07:09:41 +02:00
15 lines
262 B
Python
15 lines
262 B
Python
|
import pytest
|
||
|
|
||
|
from mealie.db.database import Database, get_database
|
||
|
from mealie.db.db_setup import SessionLocal
|
||
|
|
||
|
|
||
|
@pytest.fixture()
|
||
|
def database() -> Database:
|
||
|
try:
|
||
|
db = SessionLocal()
|
||
|
yield get_database(db)
|
||
|
|
||
|
finally:
|
||
|
db.close()
|