fix problems

This commit is contained in:
2026-10-30 11:07:02 +03:00
parent e3a6372e91
commit b94b07654f
7 changed files with 71 additions and 12 deletions
+8
View File
@@ -42,6 +42,14 @@ def main():
bob = c.user("grade4_bob")
# Basic is only for login; business endpoints require the returned Bearer token.
c.call("POST", "/api/v1/users", 400, body={
"username": "spaces_" + uuid.uuid4().hex[:16],
"display_name": "Whitespace",
"password": "\u0085" * 12,
})
c.call("POST", "/api/v1/auth/sessions", 400,
headers={**basic(alice["registration"]["username"], alice["registration"]["password"]),
"Content-Type": "application/json"}, raw=b"{}")
wrong = c.call("POST", "/api/v1/auth/sessions", 401,
headers=basic(alice["registration"]["username"], "wrong-password-123"))
check(wrong["headers"].get("WWW-Authenticate", "").startswith("Basic"),