add test for favourites

This commit is contained in:
codl 2017-11-30 02:26:28 +01:00
parent f274e0fb5c
commit 9a9604896c
No known key found for this signature in database
GPG key ID: 6CD7C8891ED1233A
2 changed files with 32 additions and 0 deletions

View file

@ -0,0 +1,27 @@
interactions:
- request:
body: null
headers:
Accept: ['*/*']
Accept-Encoding: ['gzip, deflate']
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
Connection: [keep-alive]
User-Agent: [python-requests/2.18.4]
method: GET
uri: http://localhost:3000/api/v1/favourites
response:
body: {string: '[]'}
headers:
Cache-Control: ['max-age=0, private, must-revalidate']
Content-Type: [application/json; charset=utf-8]
ETag: [W/"81bd415584c93a9b65e719202c32c8f6"]
Transfer-Encoding: [chunked]
Vary: ['Accept-Encoding, Origin']
X-Content-Type-Options: [nosniff]
X-Frame-Options: [SAMEORIGIN]
X-Request-Id: [0cc085dc-b2c7-4524-9dbf-4b9449f4aa79]
X-Runtime: ['0.029419']
X-XSS-Protection: [1; mode=block]
content-length: ['2']
status: {code: 200, message: OK}
version: 1

View file

@ -81,6 +81,11 @@ def test_status_fav_unfav(status, api):
status = api.status_unfavourite(status['id'])
assert not status['favourited']
@pytest.mark.vcr()
def test_favourites(api):
favs = api.favourites()
assert isinstance(favs, list)
@pytest.mark.vcr()
def test_status_mute_unmute(status, api):