Реализовать асинхронную обработку вложений
This commit is contained in:
@@ -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,
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user