forked from mtusi2026/mtusi2026lab5
feat: крролик, по тщ 5 лаба
This commit is contained in:
@@ -86,7 +86,7 @@ def send_message(api: httpx.Client) -> Callable[..., dict]:
|
||||
|
||||
@pytest.fixture
|
||||
def upload(api: httpx.Client) -> Callable[..., dict]:
|
||||
"""Успешная загрузка вложения: 201 и Attachment"""
|
||||
"""Приём 202 queued и ожидание ready для прежних сквозных проверок"""
|
||||
|
||||
def create(
|
||||
user: dict,
|
||||
@@ -98,8 +98,11 @@ def upload(api: httpx.Client) -> Callable[..., dict]:
|
||||
response = upload_raw(
|
||||
api, user, chat["id"], content or png_bytes(), content_type, filename
|
||||
)
|
||||
assert response.status_code == 201, response.text
|
||||
return response.json()
|
||||
assert response.status_code == 202, response.text
|
||||
assert response.json()["status"] == "queued"
|
||||
from helpers import wait_attachment
|
||||
|
||||
return wait_attachment(api, user, response.json()["id"])
|
||||
|
||||
return create
|
||||
|
||||
|
||||
Reference in New Issue
Block a user