diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/cassettes/test_trends.yaml | 29 | ||||
-rw-r--r-- | tests/test_instance.py | 5 |
2 files changed, 34 insertions, 0 deletions
diff --git a/tests/cassettes/test_trends.yaml b/tests/cassettes/test_trends.yaml new file mode 100644 index 0000000..15cfd9b --- /dev/null +++ b/tests/cassettes/test_trends.yaml | |||
@@ -0,0 +1,29 @@ | |||
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/trends | ||
12 | response: | ||
13 | body: {string: '[]'} | ||
14 | headers: | ||
15 | Cache-Control: ['no-cache, no-store'] | ||
16 | Content-Type: [application/json; charset=utf-8] | ||
17 | Referrer-Policy: [strict-origin-when-cross-origin] | ||
18 | Transfer-Encoding: [chunked] | ||
19 | Vary: ['Accept-Encoding, Origin'] | ||
20 | X-Content-Type-Options: [nosniff] | ||
21 | X-Download-Options: [noopen] | ||
22 | X-Frame-Options: [SAMEORIGIN] | ||
23 | X-Permitted-Cross-Domain-Policies: [none] | ||
24 | X-Request-Id: [cd891bac-8b4d-476e-b767-2346ff6f498e] | ||
25 | X-Runtime: ['0.074803'] | ||
26 | X-XSS-Protection: [1; mode=block] | ||
27 | content-length: ['2'] | ||
28 | status: {code: 200, message: OK} | ||
29 | version: 1 | ||
diff --git a/tests/test_instance.py b/tests/test_instance.py index 343af18..e7dee1f 100644 --- a/tests/test_instance.py +++ b/tests/test_instance.py | |||
@@ -43,3 +43,8 @@ def test_nodeinfo(api): | |||
43 | assert nodeinfo | 43 | assert nodeinfo |
44 | assert nodeinfo.version == '2.0' | 44 | assert nodeinfo.version == '2.0' |
45 | 45 | ||
46 | |||
47 | @pytest.mark.vcr() | ||
48 | def test_trends(api): | ||
49 | assert isinstance(api.trends(), list) | ||
50 | |||