feat: add replicated API with transactional message idempotency
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import json
|
||||
from uuid import uuid4
|
||||
|
||||
import pytest
|
||||
from conftest import check, headers
|
||||
|
||||
|
||||
@pytest.mark.parametrize("encoding", ["utf-16", "utf-32"])
|
||||
def test_only_utf8_json(client, encoding):
|
||||
payload = {"username": "u_" + uuid4().hex[:20], "display_name": "UTF"}
|
||||
payload["password"] = "Synthetic-encoding-test-123"
|
||||
result = client.post(
|
||||
"/api/v1/users",
|
||||
content=json.dumps(payload).encode(encoding),
|
||||
headers={"Content-Type": "application/json"},
|
||||
)
|
||||
check(result, 400, "Error")
|
||||
|
||||
|
||||
def test_leading_zero_limit(client, actors, chat):
|
||||
result = client.get(
|
||||
"/api/v1/chats/" + chat["id"] + "/messages",
|
||||
headers=headers(actors[0]),
|
||||
params={"limit": "0001"},
|
||||
)
|
||||
check(result, 200, "MessagePage")
|
||||
Reference in New Issue
Block a user