mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-05-24 01:12:54 -04:00
15 lines
295 B
Python
15 lines
295 B
Python
import pytest
|
|
|
|
from mealie.db.db_setup import SessionLocal
|
|
from mealie.repos.all_repositories import AllRepositories, get_repositories
|
|
|
|
|
|
@pytest.fixture()
|
|
def database() -> AllRepositories:
|
|
try:
|
|
db = SessionLocal()
|
|
yield get_repositories(db)
|
|
|
|
finally:
|
|
db.close()
|