mirror of
https://github.com/jointakahe/takahe.git
synced 2024-11-13 10:51:03 +00:00
17 lines
504 B
Python
17 lines
504 B
Python
import pytest
|
|
|
|
|
|
@pytest.mark.django_db
|
|
def test_post_status(api_token, identity, client):
|
|
response = client.post(
|
|
"/api/v1/statuses",
|
|
HTTP_AUTHORIZATION=f"Bearer {api_token.token}",
|
|
HTTP_ACCEPT="application/json",
|
|
content_type="application/json",
|
|
data={
|
|
"status": "Hello, world!",
|
|
"visibility": "unlisted",
|
|
},
|
|
).json()
|
|
assert response["content"] == "<p>Hello, world!</p>"
|
|
assert response["visibility"] == "unlisted"
|