diff options
author | Lorenz Diener <[email protected]> | 2017-11-30 16:02:52 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2017-11-30 16:02:52 +0100 |
commit | 7e3a4a17a28f52b186e6453a0d1f43614f110b4b (patch) | |
tree | 48aafcc35397205d52613cc305dc6baff1cbbda1 /tests/cassettes/test_notifications.yaml | |
parent | c6f1196ddc1899e64d60b102e1cfa1c1c1321e77 (diff) | |
parent | d87ada3d73de69ba371acaeca55751e2410c3786 (diff) | |
download | mastodon.py-7e3a4a17a28f52b186e6453a0d1f43614f110b4b.tar.gz |
Merge pull request #113 from codl/more-tests
More tests!
Diffstat (limited to 'tests/cassettes/test_notifications.yaml')
-rw-r--r-- | tests/cassettes/test_notifications.yaml | 130 |
1 files changed, 130 insertions, 0 deletions
diff --git a/tests/cassettes/test_notifications.yaml b/tests/cassettes/test_notifications.yaml new file mode 100644 index 0000000..c9945cf --- /dev/null +++ b/tests/cassettes/test_notifications.yaml | |||
@@ -0,0 +1,130 @@ | |||
1 | interactions: | ||
2 | - request: | ||
3 | body: visibility=&status=%40mastodonpy_test+hello%21 | ||
4 | headers: | ||
5 | Accept: ['*/*'] | ||
6 | Accept-Encoding: ['gzip, deflate'] | ||
7 | Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN_2] | ||
8 | Connection: [keep-alive] | ||
9 | Content-Length: ['46'] | ||
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":"99090794695574938","created_at":"2017-11-30T01:32:14.306Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"sr","uri":"http://localhost:3000/users/admin/statuses/99090794695574938","content":"\u003cp\u003e\u003cspan | ||
16 | class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\" | ||
17 | class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e | ||
18 | hello!\u003c/p\u003e","url":"http://localhost:3000/@admin/99090794695574938","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py | ||
19 | test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello | ||
20 | :)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":53},"media_attachments":[],"mentions":[{"id":"1234567890123456","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[]}'} | ||
21 | headers: | ||
22 | Cache-Control: ['max-age=0, private, must-revalidate'] | ||
23 | Content-Type: [application/json; charset=utf-8] | ||
24 | ETag: [W/"7201d05fcb4b437059d9ce1e2174af25"] | ||
25 | Transfer-Encoding: [chunked] | ||
26 | Vary: ['Accept-Encoding, Origin'] | ||
27 | X-Content-Type-Options: [nosniff] | ||
28 | X-Frame-Options: [SAMEORIGIN] | ||
29 | X-Request-Id: [58594a6a-aa68-4f68-86f0-f15a2f22cf73] | ||
30 | X-Runtime: ['0.135719'] | ||
31 | X-XSS-Protection: [1; mode=block] | ||
32 | content-length: ['1542'] | ||
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/notifications | ||
44 | response: | ||
45 | body: {string: '[{"id":"16","type":"mention","created_at":"2017-11-30T01:32:14.351Z","account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello | ||
46 | :)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":53},"status":{"id":"99090794695574938","created_at":"2017-11-30T01:32:14.306Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"sr","uri":"http://localhost:3000/users/admin/statuses/99090794695574938","content":"\u003cp\u003e\u003cspan | ||
47 | class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\" | ||
48 | class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e | ||
49 | hello!\u003c/p\u003e","url":"http://localhost:3000/@admin/99090794695574938","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"reblog":null,"application":{"name":"Mastodon.py | ||
50 | test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello | ||
51 | :)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":53},"media_attachments":[],"mentions":[{"id":"1234567890123456","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[]}},{"id":"15","type":"mention","created_at":"2017-11-30T01:31:26.680Z","account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello | ||
52 | :)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":53},"status":{"id":"99090791570808347","created_at":"2017-11-30T01:31:26.630Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"sr","uri":"http://localhost:3000/users/admin/statuses/99090791570808347","content":"\u003cp\u003e\u003cspan | ||
53 | class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\" | ||
54 | class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e | ||
55 | hello!\u003c/p\u003e","url":"http://localhost:3000/@admin/99090791570808347","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"reblog":null,"application":{"name":"Mastodon.py | ||
56 | test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello | ||
57 | :)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":53},"media_attachments":[],"mentions":[{"id":"1234567890123456","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[]}}]'} | ||
58 | headers: | ||
59 | Cache-Control: ['max-age=0, private, must-revalidate'] | ||
60 | Content-Type: [application/json; charset=utf-8] | ||
61 | ETag: [W/"fa29e5b94ab138276eb80b2cd108df18"] | ||
62 | Link: ['<http://localhost:3000/api/v1/notifications?max_id=15>; rel="next", | ||
63 | <http://localhost:3000/api/v1/notifications?since_id=16>; rel="prev"'] | ||
64 | Transfer-Encoding: [chunked] | ||
65 | Vary: ['Accept-Encoding, Origin'] | ||
66 | X-Content-Type-Options: [nosniff] | ||
67 | X-Frame-Options: [SAMEORIGIN] | ||
68 | X-Request-Id: [431119a5-b511-4f69-a07c-8b05a2ff8390] | ||
69 | X-Runtime: ['0.102001'] | ||
70 | X-XSS-Protection: [1; mode=block] | ||
71 | content-length: ['4441'] | ||
72 | status: {code: 200, message: OK} | ||
73 | - request: | ||
74 | body: null | ||
75 | headers: | ||
76 | Accept: ['*/*'] | ||
77 | Accept-Encoding: ['gzip, deflate'] | ||
78 | Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN] | ||
79 | Connection: [keep-alive] | ||
80 | User-Agent: [python-requests/2.18.4] | ||
81 | method: GET | ||
82 | uri: http://localhost:3000/api/v1/notifications/16 | ||
83 | response: | ||
84 | body: {string: '{"id":"16","type":"mention","created_at":"2017-11-30T01:32:14.351Z","account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello | ||
85 | :)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":53},"status":{"id":"99090794695574938","created_at":"2017-11-30T01:32:14.306Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"sr","uri":"http://localhost:3000/users/admin/statuses/99090794695574938","content":"\u003cp\u003e\u003cspan | ||
86 | class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\" | ||
87 | class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e | ||
88 | hello!\u003c/p\u003e","url":"http://localhost:3000/@admin/99090794695574938","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"reblog":null,"application":{"name":"Mastodon.py | ||
89 | test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello | ||
90 | :)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":53},"media_attachments":[],"mentions":[{"id":"1234567890123456","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[]}}'} | ||
91 | headers: | ||
92 | Cache-Control: ['max-age=0, private, must-revalidate'] | ||
93 | Content-Type: [application/json; charset=utf-8] | ||
94 | ETag: [W/"80fb7e9873a9fd89cb5d3be0d5ffd248"] | ||
95 | Transfer-Encoding: [chunked] | ||
96 | Vary: ['Accept-Encoding, Origin'] | ||
97 | X-Content-Type-Options: [nosniff] | ||
98 | X-Frame-Options: [SAMEORIGIN] | ||
99 | X-Request-Id: [68eef56e-6d1b-4a71-8435-014d37d5a5e0] | ||
100 | X-Runtime: ['0.045248'] | ||
101 | X-XSS-Protection: [1; mode=block] | ||
102 | content-length: ['2219'] | ||
103 | status: {code: 200, message: OK} | ||
104 | - request: | ||
105 | body: null | ||
106 | headers: | ||
107 | Accept: ['*/*'] | ||
108 | Accept-Encoding: ['gzip, deflate'] | ||
109 | Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN_2] | ||
110 | Connection: [keep-alive] | ||
111 | Content-Length: ['0'] | ||
112 | User-Agent: [python-requests/2.18.4] | ||
113 | method: DELETE | ||
114 | uri: http://localhost:3000/api/v1/statuses/99090794695574938 | ||
115 | response: | ||
116 | body: {string: '{}'} | ||
117 | headers: | ||
118 | Cache-Control: ['max-age=0, private, must-revalidate'] | ||
119 | Content-Type: [application/json; charset=utf-8] | ||
120 | ETag: [W/"91480b3dc645d962fb3e347248bb79d0"] | ||
121 | Transfer-Encoding: [chunked] | ||
122 | Vary: ['Accept-Encoding, Origin'] | ||
123 | X-Content-Type-Options: [nosniff] | ||
124 | X-Frame-Options: [SAMEORIGIN] | ||
125 | X-Request-Id: [96a5b3a1-51b4-498b-bf0e-6b15a78847e6] | ||
126 | X-Runtime: ['0.015668'] | ||
127 | X-XSS-Protection: [1; mode=block] | ||
128 | content-length: ['2'] | ||
129 | status: {code: 200, message: OK} | ||
130 | version: 1 | ||