mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-07-25 08:09:41 +02:00
* add default assets for user profile * add recipe avatar * change user_id to UUID * add profile image upload * setup image cache keys * cleanup tests and add image tests * purge user data on delete * new user repository tests * add user_id validator for int -> UUID conversion * delete depreciated route * force set content type * refactor tests to use temp directory * validate parent exists before createing * set user_id to correct type * update instruction id * reset primary key on migration
14 lines
262 B
Python
14 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()
|