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:
parent
ea7c4771ee
commit
74e13682cb
68 changed files with 371 additions and 369 deletions
6
tests/fixtures/fixture_database.py
vendored
6
tests/fixtures/fixture_database.py
vendored
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue