mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-12-08 11:25:17 -05:00
Feature/user photo storage (#877)
* 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
This commit is contained in:
10
tests/unit_tests/repository_tests/test_user_repository.py
Normal file
10
tests/unit_tests/repository_tests/test_user_repository.py
Normal file
@@ -0,0 +1,10 @@
|
||||
from mealie.db.database import Database
|
||||
from mealie.schema.user import PrivateUser
|
||||
from tests.utils.fixture_schemas import TestUser
|
||||
|
||||
|
||||
def test_user_directory_deleted_on_delete(database: Database, unique_user: TestUser) -> None:
|
||||
user_dir = PrivateUser.get_directory(unique_user.user_id)
|
||||
assert user_dir.exists()
|
||||
database.users.delete(unique_user.user_id)
|
||||
assert not user_dir.exists()
|
||||
Reference in New Issue
Block a user