aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorenz Diener <[email protected]>2019-10-12 21:47:58 +0200
committerLorenz Diener <[email protected]>2019-10-12 21:47:58 +0200
commit63bf5afc61503ebd99a7e7bc36014b378db98d23 (patch)
treeb66daf9ec0727cd0c59a9ca8146958d74b508ea3 /tests/cassettes/test_suggested_tags.yaml
parent3194b1295e8f4a6d151d18ad4f23174c63408c05 (diff)
downloadmastodon.py-63bf5afc61503ebd99a7e7bc36014b378db98d23.tar.gz
Implement, test and document featured and suggested tags APIs (fixes #191)
Diffstat (limited to 'tests/cassettes/test_suggested_tags.yaml')
-rw-r--r--tests/cassettes/test_suggested_tags.yaml90
1 files changed, 90 insertions, 0 deletions
diff --git a/tests/cassettes/test_suggested_tags.yaml b/tests/cassettes/test_suggested_tags.yaml
new file mode 100644
index 0000000..2a73e03
--- /dev/null
+++ b/tests/cassettes/test_suggested_tags.yaml
@@ -0,0 +1,90 @@
1interactions:
2- request:
3 body: status=cool+free+%23ringtones
4 headers:
5 Accept: ['*/*']
6 Accept-Encoding: ['gzip, deflate']
7 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
8 Connection: [keep-alive]
9 Content-Length: ['29']
10 Content-Type: [application/x-www-form-urlencoded]
11 User-Agent: [python-requests/2.18.4]
12 method: POST
13 uri: http://localhost:3000/api/v1/statuses
14 response:
15 body: {string: '{"id":"102951123020457171","created_at":"2019-10-12T19:44:29.956Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost/users/mastodonpy_test/statuses/102951123020457171","url":"http://localhost/@mastodonpy_test/102951123020457171","replies_count":0,"reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"content":"\u003cp\u003ecool
16 free \u003ca href=\"http://localhost/tags/ringtones\" class=\"mention hashtag\"
17 rel=\"tag\"\u003e#\u003cspan\u003eringtones\u003c/span\u003e\u003c/a\u003e\u003c/p\u003e","reblog":null,"application":{"name":"Mastodon.py
18 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"bot":false,"created_at":"2019-06-22T23:11:52.441Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost/@mastodonpy_test","avatar":"http://localhost/avatars/original/missing.png","avatar_static":"http://localhost/avatars/original/missing.png","header":"http://localhost/headers/original/missing.png","header_static":"http://localhost/headers/original/missing.png","followers_count":0,"following_count":1,"statuses_count":3,"last_status_at":"2019-10-12T19:44:29.976Z","emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[{"name":"ringtones","url":"http://localhost/tags/ringtones"}],"emojis":[],"card":null,"poll":null}'}
19 headers:
20 Cache-Control: ['no-cache, no-store']
21 Content-Type: [application/json; charset=utf-8]
22 Referrer-Policy: [strict-origin-when-cross-origin]
23 Transfer-Encoding: [chunked]
24 Vary: ['Accept-Encoding, Origin']
25 X-Content-Type-Options: [nosniff]
26 X-Download-Options: [noopen]
27 X-Frame-Options: [SAMEORIGIN]
28 X-Permitted-Cross-Domain-Policies: [none]
29 X-Request-Id: [7c348bde-1d33-451a-8ae0-87cb09d8a1a2]
30 X-Runtime: ['0.222922']
31 X-XSS-Protection: [1; mode=block]
32 content-length: ['1494']
33 status: {code: 200, message: OK}
34- request:
35 body: null
36 headers:
37 Accept: ['*/*']
38 Accept-Encoding: ['gzip, deflate']
39 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
40 Connection: [keep-alive]
41 User-Agent: [python-requests/2.18.4]
42 method: GET
43 uri: http://localhost:3000/api/v1/featured_tags/suggestions
44 response:
45 body: {string: '[{"name":"ringtones","url":"http://localhost/tags/ringtones","history":[{"day":"1570838400","uses":"1","accounts":"1"},{"day":"1570752000","uses":"0","accounts":"0"},{"day":"1570665600","uses":"0","accounts":"0"},{"day":"1570579200","uses":"0","accounts":"0"},{"day":"1570492800","uses":"0","accounts":"0"},{"day":"1570406400","uses":"0","accounts":"0"},{"day":"1570320000","uses":"0","accounts":"0"}]}]'}
46 headers:
47 Cache-Control: ['no-cache, no-store']
48 Content-Type: [application/json; charset=utf-8]
49 Referrer-Policy: [strict-origin-when-cross-origin]
50 Transfer-Encoding: [chunked]
51 Vary: ['Accept-Encoding, Origin']
52 X-Content-Type-Options: [nosniff]
53 X-Download-Options: [noopen]
54 X-Frame-Options: [SAMEORIGIN]
55 X-Permitted-Cross-Domain-Policies: [none]
56 X-Request-Id: [fc6ec1a8-9c2e-4c08-925d-f80522d5bf65]
57 X-Runtime: ['0.061457']
58 X-XSS-Protection: [1; mode=block]
59 content-length: ['403']
60 status: {code: 200, message: OK}
61- request:
62 body: null
63 headers:
64 Accept: ['*/*']
65 Accept-Encoding: ['gzip, deflate']
66 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
67 Connection: [keep-alive]
68 Content-Length: ['0']
69 User-Agent: [python-requests/2.18.4]
70 method: DELETE
71 uri: http://localhost:3000/api/v1/statuses/102951123020457171
72 response:
73 body: {string: '{"id":"102951123020457171","created_at":"2019-10-12T19:44:29.956Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost/users/mastodonpy_test/statuses/102951123020457171","url":"http://localhost/@mastodonpy_test/102951123020457171","replies_count":0,"reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"text":"cool
74 free #ringtones","reblog":null,"application":{"name":"Mastodon.py test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"bot":false,"created_at":"2019-06-22T23:11:52.441Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost/@mastodonpy_test","avatar":"http://localhost/avatars/original/missing.png","avatar_static":"http://localhost/avatars/original/missing.png","header":"http://localhost/headers/original/missing.png","header_static":"http://localhost/headers/original/missing.png","followers_count":0,"following_count":1,"statuses_count":3,"last_status_at":"2019-10-12T19:44:29.976Z","emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[{"name":"ringtones","url":"http://localhost/tags/ringtones"}],"emojis":[],"card":null,"poll":null}'}
75 headers:
76 Cache-Control: ['no-cache, no-store']
77 Content-Type: [application/json; charset=utf-8]
78 Referrer-Policy: [strict-origin-when-cross-origin]
79 Transfer-Encoding: [chunked]
80 Vary: ['Accept-Encoding, Origin']
81 X-Content-Type-Options: [nosniff]
82 X-Download-Options: [noopen]
83 X-Frame-Options: [SAMEORIGIN]
84 X-Permitted-Cross-Domain-Policies: [none]
85 X-Request-Id: [68301b80-982f-4397-8c6b-d9e7d8cd308b]
86 X-Runtime: ['0.118422']
87 X-XSS-Protection: [1; mode=block]
88 content-length: ['1325']
89 status: {code: 200, message: OK}
90version: 1
Powered by cgit v1.2.3 (git 2.41.0)