diff options
-rw-r--r-- | tests/cassettes/test_favourites.yaml | 27 | ||||
-rw-r--r-- | tests/test_status.py | 5 |
2 files changed, 32 insertions, 0 deletions
diff --git a/tests/cassettes/test_favourites.yaml b/tests/cassettes/test_favourites.yaml new file mode 100644 index 0000000..1bba85f --- /dev/null +++ b/tests/cassettes/test_favourites.yaml | |||
@@ -0,0 +1,27 @@ | |||
1 | interactions: | ||
2 | - request: | ||
3 | body: null | ||
4 | headers: | ||
5 | Accept: ['*/*'] | ||
6 | Accept-Encoding: ['gzip, deflate'] | ||
7 | Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN] | ||
8 | Connection: [keep-alive] | ||
9 | User-Agent: [python-requests/2.18.4] | ||
10 | method: GET | ||
11 | uri: http://localhost:3000/api/v1/favourites | ||
12 | response: | ||
13 | body: {string: '[]'} | ||
14 | headers: | ||
15 | Cache-Control: ['max-age=0, private, must-revalidate'] | ||
16 | Content-Type: [application/json; charset=utf-8] | ||
17 | ETag: [W/"81bd415584c93a9b65e719202c32c8f6"] | ||
18 | Transfer-Encoding: [chunked] | ||
19 | Vary: ['Accept-Encoding, Origin'] | ||
20 | X-Content-Type-Options: [nosniff] | ||
21 | X-Frame-Options: [SAMEORIGIN] | ||
22 | X-Request-Id: [0cc085dc-b2c7-4524-9dbf-4b9449f4aa79] | ||
23 | X-Runtime: ['0.029419'] | ||
24 | X-XSS-Protection: [1; mode=block] | ||
25 | content-length: ['2'] | ||
26 | status: {code: 200, message: OK} | ||
27 | version: 1 | ||
diff --git a/tests/test_status.py b/tests/test_status.py index a5b8b3a..ab8540f 100644 --- a/tests/test_status.py +++ b/tests/test_status.py | |||
@@ -81,6 +81,11 @@ def test_status_fav_unfav(status, api): | |||
81 | status = api.status_unfavourite(status['id']) | 81 | status = api.status_unfavourite(status['id']) |
82 | assert not status['favourited'] | 82 | assert not status['favourited'] |
83 | 83 | ||
84 | @pytest.mark.vcr() | ||
85 | def test_favourites(api): | ||
86 | favs = api.favourites() | ||
87 | assert isinstance(favs, list) | ||
88 | |||
84 | 89 | ||
85 | @pytest.mark.vcr() | 90 | @pytest.mark.vcr() |
86 | def test_status_mute_unmute(status, api): | 91 | def test_status_mute_unmute(status, api): |