fix(auth): avoid redundant password hashing in registration races
This commit is contained in:
@@ -34,7 +34,11 @@ def check(result: httpx.Response, status: int, schema: str) -> dict:
|
||||
401: "unauthorized",
|
||||
404: "not_found",
|
||||
409: "conflict",
|
||||
413: "payload_too_large",
|
||||
415: "unsupported_media_type",
|
||||
429: "rate_limited",
|
||||
500: "internal_error",
|
||||
503: "unavailable",
|
||||
}[status]
|
||||
)
|
||||
return payload
|
||||
|
||||
@@ -92,9 +92,7 @@ def test_filename_guard(client, actors, chat, name):
|
||||
)
|
||||
def test_image_guards(client, actors, chat, data, mime, status):
|
||||
r = upload(client, actors[0], chat, data=data, mime=mime)
|
||||
assert r.status_code == status
|
||||
assert r.headers["x-instance-id"] and r.headers["x-request-id"]
|
||||
assert r.json()["error"]["request_id"] == r.headers["x-request-id"]
|
||||
check(r, status, "Error")
|
||||
|
||||
|
||||
def test_jpeg_original_unchanged(client, actors, chat):
|
||||
|
||||
Reference in New Issue
Block a user