2021-09-09 08:51:29 -08:00
|
|
|
from dataclasses import dataclass
|
|
|
|
from typing import Any
|
2021-12-04 14:18:46 -09:00
|
|
|
from uuid import UUID
|
2021-09-09 08:51:29 -08:00
|
|
|
|
2023-02-26 13:12:16 -06:00
|
|
|
from mealie.db.models.users.users import AuthMethod
|
2024-08-22 10:14:32 -05:00
|
|
|
from mealie.repos.repository_factory import AllRepositories
|
2023-02-26 13:12:16 -06:00
|
|
|
|
2021-09-09 08:51:29 -08:00
|
|
|
|
|
|
|
@dataclass
|
|
|
|
class TestUser:
|
2021-10-07 09:39:47 -08:00
|
|
|
email: str
|
2021-12-18 19:04:36 -09:00
|
|
|
user_id: UUID
|
2022-03-15 23:28:42 +01:00
|
|
|
username: str
|
2025-01-14 09:00:23 -07:00
|
|
|
full_name: str
|
2022-08-13 13:18:12 -08:00
|
|
|
password: str
|
2021-12-04 14:18:46 -09:00
|
|
|
_group_id: UUID
|
2024-08-22 10:14:32 -05:00
|
|
|
_household_id: UUID
|
2021-09-09 08:51:29 -08:00
|
|
|
token: Any
|
2023-02-26 13:12:16 -06:00
|
|
|
auth_method = AuthMethod.MEALIE
|
2024-08-22 10:14:32 -05:00
|
|
|
repos: AllRepositories
|
2021-12-04 14:18:46 -09:00
|
|
|
|
|
|
|
@property
|
|
|
|
def group_id(self) -> str:
|
|
|
|
return str(self._group_id)
|
2024-08-22 10:14:32 -05:00
|
|
|
|
|
|
|
@property
|
|
|
|
def household_id(self) -> str:
|
|
|
|
return str(self._household_id)
|