add test for favourites
This commit is contained in:
pare
f274e0fb5c
commit
9a9604896c
S'han modificat 2 arxius amb 32 adicions i 0 eliminacions
27
tests/cassettes/test_favourites.yaml
Normal file
27
tests/cassettes/test_favourites.yaml
Normal 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
|
|
@ -81,6 +81,11 @@ def test_status_fav_unfav(status, api):
|
||||||
status = api.status_unfavourite(status['id'])
|
status = api.status_unfavourite(status['id'])
|
||||||
assert not status['favourited']
|
assert not status['favourited']
|
||||||
|
|
||||||
|
@pytest.mark.vcr()
|
||||||
|
def test_favourites(api):
|
||||||
|
favs = api.favourites()
|
||||||
|
assert isinstance(favs, list)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.vcr()
|
@pytest.mark.vcr()
|
||||||
def test_status_mute_unmute(status, api):
|
def test_status_mute_unmute(status, api):
|
||||||
|
|
Loading…
Referencia en una nova incidència