style(backend): разобрать 13 предупреждений ruff (E501)
Реальный код переформатирован (models/user.py, services/instance_settings.py, tests/test_auth.py). Текст регламента обработки персональных данных вынесен в services/consent_policy_text.py с точечным per-file-ignore E501 (как и email_templates.py) — это прозаический шаблон документа, а не код, оборачивать его строки ради лимита длины бессмысленно.
This commit is contained in:
@@ -529,7 +529,11 @@ async def test_register_without_consent_when_required_returns_400(
|
||||
|
||||
response = await client.post(
|
||||
"/api/v1/auth/register",
|
||||
json={"email": "no-consent@example.com", "name_user": "No Consent", "password": "supersecret1"},
|
||||
json={
|
||||
"email": "no-consent@example.com",
|
||||
"name_user": "No Consent",
|
||||
"password": "supersecret1",
|
||||
},
|
||||
)
|
||||
assert response.status_code == 400
|
||||
assert response.json()["detail"] == "consent_required"
|
||||
@@ -571,7 +575,11 @@ async def test_register_without_consent_when_module_disabled_succeeds_and_leaves
|
||||
галочки, `consent_version`/`consent_given_at` остаются `NULL`."""
|
||||
response = await client.post(
|
||||
"/api/v1/auth/register",
|
||||
json={"email": "consent-disabled@example.com", "name_user": "Consent Disabled", "password": "supersecret1"},
|
||||
json={
|
||||
"email": "consent-disabled@example.com",
|
||||
"name_user": "Consent Disabled",
|
||||
"password": "supersecret1",
|
||||
},
|
||||
)
|
||||
assert response.status_code == 201, response.text
|
||||
|
||||
|
||||
Reference in New Issue
Block a user