forked from mtusi2026/mtusi2026lab3
feat: конф нгинкс, тесты, ключ идмпт etc
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
import uuid
|
||||
|
||||
import httpx
|
||||
from helpers import assert_error, auth
|
||||
from helpers import assert_error, auth, message_headers
|
||||
|
||||
|
||||
def test_outsider_cannot_access_chat(
|
||||
@@ -18,7 +18,9 @@ def test_outsider_cannot_access_chat(
|
||||
|
||||
assert_error(api.get(path, headers=auth(eve)), 404, "not_found")
|
||||
assert_error(api.get(f"{path}/messages", headers=auth(eve)), 404, "not_found")
|
||||
response = api.post(f"{path}/messages", json={"text": "чужое"}, headers=auth(eve))
|
||||
response = api.post(
|
||||
f"{path}/messages", json={"text": "чужое"}, headers=message_headers(eve)
|
||||
)
|
||||
assert_error(response, 404, "not_found")
|
||||
|
||||
history = api.get(f"{path}/messages", headers=auth(bob)).json()
|
||||
|
||||
Reference in New Issue
Block a user