feat: конф нгинкс, тесты, ключ идмпт etc

This commit is contained in:
Enterxx2
2026-10-20 10:41:56 +03:00
parent aa971fbd27
commit b53e5d1077
63 changed files with 5013 additions and 153 deletions
+5
View File
@@ -30,6 +30,11 @@ def auth(user: dict) -> dict[str, str]:
return {"Authorization": f"Bearer {user['token']}"}
def message_headers(user: dict, key: str | None = None) -> dict[str, str]:
"""Bearer и Idempotency-Key (новый, если не задан)"""
return {**auth(user), "Idempotency-Key": key or uuid.uuid4().hex}
def public_user(user: dict) -> dict:
"""User из ответа API без тестовых полей token/password"""
return {field: user[field] for field in USER_FIELDS}