aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLorenz Diener <[email protected]>2019-10-12 21:02:39 +0200
committerLorenz Diener <[email protected]>2019-10-12 21:02:39 +0200
commit3194b1295e8f4a6d151d18ad4f23174c63408c05 (patch)
tree15e126c70b7241bf7c8295cc74ee18bd7a700d22 /tests
parent2e5095f301c62c73f6b839bbbffeda14ab8cd797 (diff)
downloadmastodon.py-3194b1295e8f4a6d151d18ad4f23174c63408c05.tar.gz
Re-add and test trends API
Diffstat (limited to 'tests')
-rw-r--r--tests/cassettes/test_trends.yaml29
-rw-r--r--tests/test_instance.py5
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 @@
1interactions:
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}
29version: 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()
48def test_trends(api):
49 assert isinstance(api.trends(), list)
50
Powered by cgit v1.2.3 (git 2.41.0)