forked from mtusi2026/mtusi2026lab3
feat: конф нгинкс, тесты, ключ идмпт etc
This commit is contained in:
@@ -5,7 +5,7 @@ from pathlib import Path
|
||||
|
||||
import httpx
|
||||
import pytest
|
||||
from helpers import auth, basic, unique_password, unique_username
|
||||
from helpers import auth, basic, message_headers, unique_password, unique_username
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
DEFAULT_BASE_URL = json.loads((ROOT / "lab.json").read_text())["default_base_url"]
|
||||
@@ -68,7 +68,7 @@ def send_message(api: httpx.Client) -> Callable[..., dict]:
|
||||
response = api.post(
|
||||
f"/api/v1/chats/{chat['id']}/messages",
|
||||
json={"text": text},
|
||||
headers=auth(user),
|
||||
headers=message_headers(user),
|
||||
)
|
||||
assert response.status_code == 201, response.text
|
||||
return response.json()
|
||||
|
||||
Reference in New Issue
Block a user