diff options
author | Andrew Godwin | 2022-12-12 00:54:51 -0700 |
---|---|---|
committer | Andrew Godwin | 2022-12-12 11:56:49 -0700 |
commit | 35a45f1c55fba69d690929c9420df565e7c5efcc (patch) | |
tree | 0969cf0b9b6c2dec04ec16d0d7444ebff744e377 /tests/api | |
parent | 7f02d51ba04a533391a2c09b5f780fc8b0193ef7 (diff) | |
download | takahe-35a45f1c55fba69d690929c9420df565e7c5efcc.tar.gz takahe-35a45f1c55fba69d690929c9420df565e7c5efcc.tar.bz2 takahe-35a45f1c55fba69d690929c9420df565e7c5efcc.zip |
A few more fixes and a bad test
Diffstat (limited to 'tests/api')
-rw-r--r-- | tests/api/test_statuses.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/api/test_statuses.py b/tests/api/test_statuses.py new file mode 100644 index 0000000..1b00642 --- /dev/null +++ b/tests/api/test_statuses.py @@ -0,0 +1,17 @@ +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" |