1
0
Fork 0
mirror of https://github.com/mealie-recipes/mealie.git synced 2025-08-05 05:25:26 +02:00

Refactor/define repository layer (#883)

* move data access layer

* rename dal -> repo
This commit is contained in:
Hayden 2021-12-18 20:52:36 -09:00 committed by GitHub
parent ea7c4771ee
commit 74e13682cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
68 changed files with 371 additions and 369 deletions

View file

@ -1,14 +1,14 @@
import pytest
from mealie.db.database import Database, get_database
from mealie.db.db_setup import SessionLocal
from mealie.repos.all_repositories import AllRepositories, get_repositories
@pytest.fixture()
def database() -> Database:
def database() -> AllRepositories:
try:
db = SessionLocal()
yield get_database(db)
yield get_repositories(db)
finally:
db.close()