Реализовать асинхронную обработку вложений

This commit is contained in:
2026-11-17 18:21:09 +03:00
parent 4d54ba3848
commit e8becaf761
51 changed files with 2234 additions and 58 deletions
+2 -2
View File
@@ -16,7 +16,7 @@ def scenario():
return client, alice, bob, eve, chat
def upload(client, actor, chat, content, *, filename='sample.png', content_type='image/png', expected=201):
def upload(client, actor, chat, content, *, filename='sample.png', content_type='image/png', expected=202):
return client.call(
'POST',
f'/api/v1/chats/{chat["id"]}/attachments?filename={quote(filename, safe="")}',
@@ -24,7 +24,7 @@ def upload(client, actor, chat, content, *, filename='sample.png', content_type=
actor=actor,
raw=content,
headers={'Content-Type': content_type},
schema='Attachment' if expected == 201 else None,
schema='Attachment' if expected == 202 else None,
)