mealie/tests/utils/fixture_schemas.py
Matthias Bilger e109391e9a
Added validators for users and recipes (#1052)
* Added validators for users and recipes

provide a simple get api, allowing to test for existence of
- user by username
- recipe by slug
- group by name (not tested yet)

* updated formatting

* Use group_id+slug for recipes, use ValidationRespone

* Fixed Flake8 errors and warnings

* add missing field for TestUser init
2022-03-15 14:28:42 -08:00

16 lines
275 B
Python

from dataclasses import dataclass
from typing import Any
from uuid import UUID
@dataclass
class TestUser:
email: str
user_id: UUID
username: str
_group_id: UUID
token: Any
@property
def group_id(self) -> str:
return str(self._group_id)