aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/cassettes/test_fetch_next_previous_from_pagination_info.yaml691
-rw-r--r--tests/test_pagination.py14
2 files changed, 704 insertions, 1 deletions
diff --git a/tests/cassettes/test_fetch_next_previous_from_pagination_info.yaml b/tests/cassettes/test_fetch_next_previous_from_pagination_info.yaml
new file mode 100644
index 0000000..65561f6
--- /dev/null
+++ b/tests/cassettes/test_fetch_next_previous_from_pagination_info.yaml
@@ -0,0 +1,691 @@
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/accounts/verify_credentials
12 response:
13 body: {string: '{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":20,"source":{"privacy":"public","sensitive":false,"note":""}}'}
14 headers:
15 Cache-Control: ['max-age=0, private, must-revalidate']
16 Content-Type: [application/json; charset=utf-8]
17 ETag: [W/"4b747af8fb1928ac9858bcc2b0e22a7f"]
18 Transfer-Encoding: [chunked]
19 Vary: ['Accept-Encoding, Origin']
20 X-Content-Type-Options: [nosniff]
21 X-Frame-Options: [SAMEORIGIN]
22 X-Request-Id: [de81f4f7-5f37-4aba-b268-7468fc7a8443]
23 X-Runtime: ['0.024952']
24 X-XSS-Protection: [1; mode=block]
25 content-length: ['616']
26 status: {code: 200, message: OK}
27- request:
28 body: visibility=&status=Toot+number+0%21
29 headers:
30 Accept: ['*/*']
31 Accept-Encoding: ['gzip, deflate']
32 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
33 Connection: [keep-alive]
34 Content-Length: ['35']
35 Content-Type: [application/x-www-form-urlencoded]
36 User-Agent: [python-requests/2.18.4]
37 method: POST
38 uri: http://localhost:3000/api/v1/statuses
39 response:
40 body: {string: '{"id":"99090169099991050","created_at":"2017-11-29T22:53:08.475Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169099991050","content":"\u003cp\u003eToot
41 number 0!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169099991050","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
42 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":21},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}'}
43 headers:
44 Cache-Control: ['max-age=0, private, must-revalidate']
45 Content-Type: [application/json; charset=utf-8]
46 ETag: [W/"31c3bf74ee8f6bbc558d0b85667b246a"]
47 Transfer-Encoding: [chunked]
48 Vary: ['Accept-Encoding, Origin']
49 X-Content-Type-Options: [nosniff]
50 X-Frame-Options: [SAMEORIGIN]
51 X-Request-Id: [63986810-71bd-48ff-b58f-d207362e0ccc]
52 X-Runtime: ['0.085776']
53 X-XSS-Protection: [1; mode=block]
54 content-length: ['1200']
55 status: {code: 200, message: OK}
56- request:
57 body: visibility=&status=Toot+number+1%21
58 headers:
59 Accept: ['*/*']
60 Accept-Encoding: ['gzip, deflate']
61 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
62 Connection: [keep-alive]
63 Content-Length: ['35']
64 Content-Type: [application/x-www-form-urlencoded]
65 User-Agent: [python-requests/2.18.4]
66 method: POST
67 uri: http://localhost:3000/api/v1/statuses
68 response:
69 body: {string: '{"id":"99090169112505641","created_at":"2017-11-29T22:53:08.693Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169112505641","content":"\u003cp\u003eToot
70 number 1!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169112505641","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
71 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":22},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}'}
72 headers:
73 Cache-Control: ['max-age=0, private, must-revalidate']
74 Content-Type: [application/json; charset=utf-8]
75 ETag: [W/"6f26b4b8036a07596b93a1888fd498a4"]
76 Transfer-Encoding: [chunked]
77 Vary: ['Accept-Encoding, Origin']
78 X-Content-Type-Options: [nosniff]
79 X-Frame-Options: [SAMEORIGIN]
80 X-Request-Id: [3f6b3829-d2b1-4157-bc8c-342b12b3c034]
81 X-Runtime: ['0.251929']
82 X-XSS-Protection: [1; mode=block]
83 content-length: ['1200']
84 status: {code: 200, message: OK}
85- request:
86 body: visibility=&status=Toot+number+2%21
87 headers:
88 Accept: ['*/*']
89 Accept-Encoding: ['gzip, deflate']
90 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
91 Connection: [keep-alive]
92 Content-Length: ['35']
93 Content-Type: [application/x-www-form-urlencoded]
94 User-Agent: [python-requests/2.18.4]
95 method: POST
96 uri: http://localhost:3000/api/v1/statuses
97 response:
98 body: {string: '{"id":"99090169128453211","created_at":"2017-11-29T22:53:08.920Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169128453211","content":"\u003cp\u003eToot
99 number 2!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169128453211","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
100 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":23},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}'}
101 headers:
102 Cache-Control: ['max-age=0, private, must-revalidate']
103 Content-Type: [application/json; charset=utf-8]
104 ETag: [W/"0fee586c008116286a8cf993df17dfbb"]
105 Transfer-Encoding: [chunked]
106 Vary: ['Accept-Encoding, Origin']
107 X-Content-Type-Options: [nosniff]
108 X-Frame-Options: [SAMEORIGIN]
109 X-Request-Id: [0264f655-6431-4aaa-8677-344dd79d7b00]
110 X-Runtime: ['0.234121']
111 X-XSS-Protection: [1; mode=block]
112 content-length: ['1200']
113 status: {code: 200, message: OK}
114- request:
115 body: visibility=&status=Toot+number+3%21
116 headers:
117 Accept: ['*/*']
118 Accept-Encoding: ['gzip, deflate']
119 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
120 Connection: [keep-alive]
121 Content-Length: ['35']
122 Content-Type: [application/x-www-form-urlencoded]
123 User-Agent: [python-requests/2.18.4]
124 method: POST
125 uri: http://localhost:3000/api/v1/statuses
126 response:
127 body: {string: '{"id":"99090169144720352","created_at":"2017-11-29T22:53:09.165Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169144720352","content":"\u003cp\u003eToot
128 number 3!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169144720352","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
129 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":24},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}'}
130 headers:
131 Cache-Control: ['max-age=0, private, must-revalidate']
132 Content-Type: [application/json; charset=utf-8]
133 ETag: [W/"312c11e44d15b19394c2d2f8b87fb958"]
134 Transfer-Encoding: [chunked]
135 Vary: ['Accept-Encoding, Origin']
136 X-Content-Type-Options: [nosniff]
137 X-Frame-Options: [SAMEORIGIN]
138 X-Request-Id: [36e178d0-918c-400c-a2b6-33e556e4b28a]
139 X-Runtime: ['0.163709']
140 X-XSS-Protection: [1; mode=block]
141 content-length: ['1200']
142 status: {code: 200, message: OK}
143- request:
144 body: visibility=&status=Toot+number+4%21
145 headers:
146 Accept: ['*/*']
147 Accept-Encoding: ['gzip, deflate']
148 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
149 Connection: [keep-alive]
150 Content-Length: ['35']
151 Content-Type: [application/x-www-form-urlencoded]
152 User-Agent: [python-requests/2.18.4]
153 method: POST
154 uri: http://localhost:3000/api/v1/statuses
155 response:
156 body: {string: '{"id":"99090169157818918","created_at":"2017-11-29T22:53:09.365Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169157818918","content":"\u003cp\u003eToot
157 number 4!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169157818918","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
158 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":25},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}'}
159 headers:
160 Cache-Control: ['max-age=0, private, must-revalidate']
161 Content-Type: [application/json; charset=utf-8]
162 ETag: [W/"9d0e323fe686c1f62c4d61491bf3b204"]
163 Transfer-Encoding: [chunked]
164 Vary: ['Accept-Encoding, Origin']
165 X-Content-Type-Options: [nosniff]
166 X-Frame-Options: [SAMEORIGIN]
167 X-Request-Id: [e6187237-7a87-493c-9aac-2548a8ea774b]
168 X-Runtime: ['0.172394']
169 X-XSS-Protection: [1; mode=block]
170 content-length: ['1200']
171 status: {code: 200, message: OK}
172- request:
173 body: visibility=&status=Toot+number+5%21
174 headers:
175 Accept: ['*/*']
176 Accept-Encoding: ['gzip, deflate']
177 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
178 Connection: [keep-alive]
179 Content-Length: ['35']
180 Content-Type: [application/x-www-form-urlencoded]
181 User-Agent: [python-requests/2.18.4]
182 method: POST
183 uri: http://localhost:3000/api/v1/statuses
184 response:
185 body: {string: '{"id":"99090169171463026","created_at":"2017-11-29T22:53:09.574Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169171463026","content":"\u003cp\u003eToot
186 number 5!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169171463026","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
187 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":26},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}'}
188 headers:
189 Cache-Control: ['max-age=0, private, must-revalidate']
190 Content-Type: [application/json; charset=utf-8]
191 ETag: [W/"c2a56972ac6908e7ff9e236735c612d9"]
192 Transfer-Encoding: [chunked]
193 Vary: ['Accept-Encoding, Origin']
194 X-Content-Type-Options: [nosniff]
195 X-Frame-Options: [SAMEORIGIN]
196 X-Request-Id: [9585c667-3c7b-484e-811a-d69cb2e7d621]
197 X-Runtime: ['0.128772']
198 X-XSS-Protection: [1; mode=block]
199 content-length: ['1200']
200 status: {code: 200, message: OK}
201- request:
202 body: visibility=&status=Toot+number+6%21
203 headers:
204 Accept: ['*/*']
205 Accept-Encoding: ['gzip, deflate']
206 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
207 Connection: [keep-alive]
208 Content-Length: ['35']
209 Content-Type: [application/x-www-form-urlencoded]
210 User-Agent: [python-requests/2.18.4]
211 method: POST
212 uri: http://localhost:3000/api/v1/statuses
213 response:
214 body: {string: '{"id":"99090169180477526","created_at":"2017-11-29T22:53:09.710Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169180477526","content":"\u003cp\u003eToot
215 number 6!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169180477526","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
216 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":27},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}'}
217 headers:
218 Cache-Control: ['max-age=0, private, must-revalidate']
219 Content-Type: [application/json; charset=utf-8]
220 ETag: [W/"62666997b986482efe88650c647f366b"]
221 Transfer-Encoding: [chunked]
222 Vary: ['Accept-Encoding, Origin']
223 X-Content-Type-Options: [nosniff]
224 X-Frame-Options: [SAMEORIGIN]
225 X-Request-Id: [32dd2d5b-5015-494d-8385-b30854ac6190]
226 X-Runtime: ['0.114435']
227 X-XSS-Protection: [1; mode=block]
228 content-length: ['1200']
229 status: {code: 200, message: OK}
230- request:
231 body: visibility=&status=Toot+number+7%21
232 headers:
233 Accept: ['*/*']
234 Accept-Encoding: ['gzip, deflate']
235 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
236 Connection: [keep-alive]
237 Content-Length: ['35']
238 Content-Type: [application/x-www-form-urlencoded]
239 User-Agent: [python-requests/2.18.4]
240 method: POST
241 uri: http://localhost:3000/api/v1/statuses
242 response:
243 body: {string: '{"id":"99090169189662625","created_at":"2017-11-29T22:53:09.844Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169189662625","content":"\u003cp\u003eToot
244 number 7!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169189662625","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
245 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":28},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}'}
246 headers:
247 Cache-Control: ['max-age=0, private, must-revalidate']
248 Content-Type: [application/json; charset=utf-8]
249 ETag: [W/"377f18cd9452c6f3d8ef359fc41f9013"]
250 Transfer-Encoding: [chunked]
251 Vary: ['Accept-Encoding, Origin']
252 X-Content-Type-Options: [nosniff]
253 X-Frame-Options: [SAMEORIGIN]
254 X-Request-Id: [33450ea9-f12c-4482-823d-2ba30a88b660]
255 X-Runtime: ['0.089887']
256 X-XSS-Protection: [1; mode=block]
257 content-length: ['1200']
258 status: {code: 200, message: OK}
259- request:
260 body: visibility=&status=Toot+number+8%21
261 headers:
262 Accept: ['*/*']
263 Accept-Encoding: ['gzip, deflate']
264 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
265 Connection: [keep-alive]
266 Content-Length: ['35']
267 Content-Type: [application/x-www-form-urlencoded]
268 User-Agent: [python-requests/2.18.4]
269 method: POST
270 uri: http://localhost:3000/api/v1/statuses
271 response:
272 body: {string: '{"id":"99090169197421619","created_at":"2017-11-29T22:53:09.966Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169197421619","content":"\u003cp\u003eToot
273 number 8!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169197421619","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
274 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":29},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}'}
275 headers:
276 Cache-Control: ['max-age=0, private, must-revalidate']
277 Content-Type: [application/json; charset=utf-8]
278 ETag: [W/"ccd9332c636650c9949000ad56d5137c"]
279 Transfer-Encoding: [chunked]
280 Vary: ['Accept-Encoding, Origin']
281 X-Content-Type-Options: [nosniff]
282 X-Frame-Options: [SAMEORIGIN]
283 X-Request-Id: [4dc5848e-55d3-4e0a-b153-f4ffefb7bf60]
284 X-Runtime: ['0.101311']
285 X-XSS-Protection: [1; mode=block]
286 content-length: ['1200']
287 status: {code: 200, message: OK}
288- request:
289 body: visibility=&status=Toot+number+9%21
290 headers:
291 Accept: ['*/*']
292 Accept-Encoding: ['gzip, deflate']
293 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
294 Connection: [keep-alive]
295 Content-Length: ['35']
296 Content-Type: [application/x-www-form-urlencoded]
297 User-Agent: [python-requests/2.18.4]
298 method: POST
299 uri: http://localhost:3000/api/v1/statuses
300 response:
301 body: {string: '{"id":"99090169205393273","created_at":"2017-11-29T22:53:10.092Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169205393273","content":"\u003cp\u003eToot
302 number 9!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169205393273","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
303 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":30},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}'}
304 headers:
305 Cache-Control: ['max-age=0, private, must-revalidate']
306 Content-Type: [application/json; charset=utf-8]
307 ETag: [W/"e6e095218cb47903adf5dccd46b07371"]
308 Transfer-Encoding: [chunked]
309 Vary: ['Accept-Encoding, Origin']
310 X-Content-Type-Options: [nosniff]
311 X-Frame-Options: [SAMEORIGIN]
312 X-Request-Id: [3477c926-1e8d-4db4-80c4-ccf6069505bd]
313 X-Runtime: ['0.103342']
314 X-XSS-Protection: [1; mode=block]
315 content-length: ['1200']
316 status: {code: 200, message: OK}
317- request:
318 body: null
319 headers:
320 Accept: ['*/*']
321 Accept-Encoding: ['gzip, deflate']
322 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
323 Connection: [keep-alive]
324 User-Agent: [python-requests/2.18.4]
325 method: GET
326 uri: http://localhost:3000/api/v1/accounts/1234567890123456/statuses?limit=5
327 response:
328 body: {string: '[{"id":"99090169205393273","created_at":"2017-11-29T22:53:10.092Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169205393273","content":"\u003cp\u003eToot
329 number 9!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169205393273","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
330 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":30},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99090169197421619","created_at":"2017-11-29T22:53:09.966Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169197421619","content":"\u003cp\u003eToot
331 number 8!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169197421619","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
332 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":30},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99090169189662625","created_at":"2017-11-29T22:53:09.844Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169189662625","content":"\u003cp\u003eToot
333 number 7!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169189662625","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
334 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":30},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99090169180477526","created_at":"2017-11-29T22:53:09.710Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169180477526","content":"\u003cp\u003eToot
335 number 6!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169180477526","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
336 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":30},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99090169171463026","created_at":"2017-11-29T22:53:09.574Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169171463026","content":"\u003cp\u003eToot
337 number 5!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169171463026","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
338 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":30},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}]'}
339 headers:
340 Cache-Control: ['max-age=0, private, must-revalidate']
341 Content-Type: [application/json; charset=utf-8]
342 ETag: [W/"8895892d066fff08c6249a6f99ed804e"]
343 Link: ['<http://localhost:3000/api/v1/accounts/1234567890123456/statuses?limit=5&max_id=99090169171463026>;
344 rel="next", <http://localhost:3000/api/v1/accounts/1234567890123456/statuses?limit=5&since_id=99090169205393273>;
345 rel="prev"']
346 Transfer-Encoding: [chunked]
347 Vary: ['Accept-Encoding, Origin']
348 X-Content-Type-Options: [nosniff]
349 X-Frame-Options: [SAMEORIGIN]
350 X-Request-Id: [b53e01ba-de3b-4353-9b7a-144af19ad0de]
351 X-Runtime: ['0.131082']
352 X-XSS-Protection: [1; mode=block]
353 content-length: ['6006']
354 status: {code: 200, message: OK}
355- request:
356 body: null
357 headers:
358 Accept: ['*/*']
359 Accept-Encoding: ['gzip, deflate']
360 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
361 Connection: [keep-alive]
362 User-Agent: [python-requests/2.18.4]
363 method: GET
364 uri: http://localhost:3000/api/v1/accounts/1234567890123456/statuses?limit=5&max_id=99090169171463026
365 response:
366 body: {string: '[{"id":"99090169157818918","created_at":"2017-11-29T22:53:09.365Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169157818918","content":"\u003cp\u003eToot
367 number 4!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169157818918","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
368 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":30},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99090169144720352","created_at":"2017-11-29T22:53:09.165Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169144720352","content":"\u003cp\u003eToot
369 number 3!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169144720352","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
370 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":30},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99090169128453211","created_at":"2017-11-29T22:53:08.920Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169128453211","content":"\u003cp\u003eToot
371 number 2!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169128453211","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
372 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":30},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99090169112505641","created_at":"2017-11-29T22:53:08.693Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169112505641","content":"\u003cp\u003eToot
373 number 1!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169112505641","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
374 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":30},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99090169099991050","created_at":"2017-11-29T22:53:08.475Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169099991050","content":"\u003cp\u003eToot
375 number 0!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169099991050","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
376 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":30},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}]'}
377 headers:
378 Cache-Control: ['max-age=0, private, must-revalidate']
379 Content-Type: [application/json; charset=utf-8]
380 ETag: [W/"97e6bf689b55a05c69636d224d96a4a1"]
381 Link: ['<http://localhost:3000/api/v1/accounts/1234567890123456/statuses?limit=5&max_id=99090169099991050>;
382 rel="next", <http://localhost:3000/api/v1/accounts/1234567890123456/statuses?limit=5&since_id=99090169157818918>;
383 rel="prev"']
384 Transfer-Encoding: [chunked]
385 Vary: ['Accept-Encoding, Origin']
386 X-Content-Type-Options: [nosniff]
387 X-Frame-Options: [SAMEORIGIN]
388 X-Request-Id: [b13d0162-1982-460a-9c3d-65e7542fcd01]
389 X-Runtime: ['0.168006']
390 X-XSS-Protection: [1; mode=block]
391 content-length: ['6006']
392 status: {code: 200, message: OK}
393- request:
394 body: null
395 headers:
396 Accept: ['*/*']
397 Accept-Encoding: ['gzip, deflate']
398 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
399 Connection: [keep-alive]
400 User-Agent: [python-requests/2.18.4]
401 method: GET
402 uri: http://localhost:3000/api/v1/accounts/1234567890123456/statuses?limit=5&since_id=99090169157818918
403 response:
404 body: {string: '[{"id":"99090169205393273","created_at":"2017-11-29T22:53:10.092Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169205393273","content":"\u003cp\u003eToot
405 number 9!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169205393273","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
406 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":30},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99090169197421619","created_at":"2017-11-29T22:53:09.966Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169197421619","content":"\u003cp\u003eToot
407 number 8!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169197421619","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
408 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":30},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99090169189662625","created_at":"2017-11-29T22:53:09.844Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169189662625","content":"\u003cp\u003eToot
409 number 7!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169189662625","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
410 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":30},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99090169180477526","created_at":"2017-11-29T22:53:09.710Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169180477526","content":"\u003cp\u003eToot
411 number 6!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169180477526","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
412 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":30},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99090169171463026","created_at":"2017-11-29T22:53:09.574Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169171463026","content":"\u003cp\u003eToot
413 number 5!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169171463026","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
414 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":30},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}]'}
415 headers:
416 Cache-Control: ['max-age=0, private, must-revalidate']
417 Content-Type: [application/json; charset=utf-8]
418 ETag: [W/"8895892d066fff08c6249a6f99ed804e"]
419 Link: ['<http://localhost:3000/api/v1/accounts/1234567890123456/statuses?limit=5&max_id=99090169171463026>;
420 rel="next", <http://localhost:3000/api/v1/accounts/1234567890123456/statuses?limit=5&since_id=99090169205393273>;
421 rel="prev"']
422 Transfer-Encoding: [chunked]
423 Vary: ['Accept-Encoding, Origin']
424 X-Content-Type-Options: [nosniff]
425 X-Frame-Options: [SAMEORIGIN]
426 X-Request-Id: [14fbab65-eeb3-4dda-8520-3ccb3000650d]
427 X-Runtime: ['0.111833']
428 X-XSS-Protection: [1; mode=block]
429 content-length: ['6006']
430 status: {code: 200, message: OK}
431- request:
432 body: null
433 headers:
434 Accept: ['*/*']
435 Accept-Encoding: ['gzip, deflate']
436 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
437 Connection: [keep-alive]
438 Content-Length: ['0']
439 User-Agent: [python-requests/2.18.4]
440 method: DELETE
441 uri: http://localhost:3000/api/v1/statuses/99090169099991050
442 response:
443 body: {string: '{}'}
444 headers:
445 Cache-Control: ['max-age=0, private, must-revalidate']
446 Content-Type: [application/json; charset=utf-8]
447 ETag: [W/"d2100116a1dcae5072eb614b86580a6a"]
448 Transfer-Encoding: [chunked]
449 Vary: ['Accept-Encoding, Origin']
450 X-Content-Type-Options: [nosniff]
451 X-Frame-Options: [SAMEORIGIN]
452 X-Request-Id: [031af8df-d374-4240-932b-69b9fd56a287]
453 X-Runtime: ['0.024463']
454 X-XSS-Protection: [1; mode=block]
455 content-length: ['2']
456 status: {code: 200, message: OK}
457- request:
458 body: null
459 headers:
460 Accept: ['*/*']
461 Accept-Encoding: ['gzip, deflate']
462 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
463 Connection: [keep-alive]
464 Content-Length: ['0']
465 User-Agent: [python-requests/2.18.4]
466 method: DELETE
467 uri: http://localhost:3000/api/v1/statuses/99090169112505641
468 response:
469 body: {string: '{}'}
470 headers:
471 Cache-Control: ['max-age=0, private, must-revalidate']
472 Content-Type: [application/json; charset=utf-8]
473 ETag: [W/"d2100116a1dcae5072eb614b86580a6a"]
474 Transfer-Encoding: [chunked]
475 Vary: ['Accept-Encoding, Origin']
476 X-Content-Type-Options: [nosniff]
477 X-Frame-Options: [SAMEORIGIN]
478 X-Request-Id: [1c37069e-0762-4ef9-af88-f3487284254c]
479 X-Runtime: ['0.029164']
480 X-XSS-Protection: [1; mode=block]
481 content-length: ['2']
482 status: {code: 200, message: OK}
483- request:
484 body: null
485 headers:
486 Accept: ['*/*']
487 Accept-Encoding: ['gzip, deflate']
488 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
489 Connection: [keep-alive]
490 Content-Length: ['0']
491 User-Agent: [python-requests/2.18.4]
492 method: DELETE
493 uri: http://localhost:3000/api/v1/statuses/99090169128453211
494 response:
495 body: {string: '{}'}
496 headers:
497 Cache-Control: ['max-age=0, private, must-revalidate']
498 Content-Type: [application/json; charset=utf-8]
499 ETag: [W/"d2100116a1dcae5072eb614b86580a6a"]
500 Transfer-Encoding: [chunked]
501 Vary: ['Accept-Encoding, Origin']
502 X-Content-Type-Options: [nosniff]
503 X-Frame-Options: [SAMEORIGIN]
504 X-Request-Id: [ee8e4da0-d995-4c51-9457-c9daeb590a62]
505 X-Runtime: ['0.028627']
506 X-XSS-Protection: [1; mode=block]
507 content-length: ['2']
508 status: {code: 200, message: OK}
509- request:
510 body: null
511 headers:
512 Accept: ['*/*']
513 Accept-Encoding: ['gzip, deflate']
514 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
515 Connection: [keep-alive]
516 Content-Length: ['0']
517 User-Agent: [python-requests/2.18.4]
518 method: DELETE
519 uri: http://localhost:3000/api/v1/statuses/99090169144720352
520 response:
521 body: {string: '{}'}
522 headers:
523 Cache-Control: ['max-age=0, private, must-revalidate']
524 Content-Type: [application/json; charset=utf-8]
525 ETag: [W/"d2100116a1dcae5072eb614b86580a6a"]
526 Transfer-Encoding: [chunked]
527 Vary: ['Accept-Encoding, Origin']
528 X-Content-Type-Options: [nosniff]
529 X-Frame-Options: [SAMEORIGIN]
530 X-Request-Id: [1e53f86d-0f9e-4748-93d5-c30a4781b2d7]
531 X-Runtime: ['0.034070']
532 X-XSS-Protection: [1; mode=block]
533 content-length: ['2']
534 status: {code: 200, message: OK}
535- request:
536 body: null
537 headers:
538 Accept: ['*/*']
539 Accept-Encoding: ['gzip, deflate']
540 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
541 Connection: [keep-alive]
542 Content-Length: ['0']
543 User-Agent: [python-requests/2.18.4]
544 method: DELETE
545 uri: http://localhost:3000/api/v1/statuses/99090169157818918
546 response:
547 body: {string: '{}'}
548 headers:
549 Cache-Control: ['max-age=0, private, must-revalidate']
550 Content-Type: [application/json; charset=utf-8]
551 ETag: [W/"d2100116a1dcae5072eb614b86580a6a"]
552 Transfer-Encoding: [chunked]
553 Vary: ['Accept-Encoding, Origin']
554 X-Content-Type-Options: [nosniff]
555 X-Frame-Options: [SAMEORIGIN]
556 X-Request-Id: [39c43ad0-289d-4104-b316-d916329fbe54]
557 X-Runtime: ['0.063475']
558 X-XSS-Protection: [1; mode=block]
559 content-length: ['2']
560 status: {code: 200, message: OK}
561- request:
562 body: null
563 headers:
564 Accept: ['*/*']
565 Accept-Encoding: ['gzip, deflate']
566 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
567 Connection: [keep-alive]
568 Content-Length: ['0']
569 User-Agent: [python-requests/2.18.4]
570 method: DELETE
571 uri: http://localhost:3000/api/v1/statuses/99090169171463026
572 response:
573 body: {string: '{}'}
574 headers:
575 Cache-Control: ['max-age=0, private, must-revalidate']
576 Content-Type: [application/json; charset=utf-8]
577 ETag: [W/"d2100116a1dcae5072eb614b86580a6a"]
578 Transfer-Encoding: [chunked]
579 Vary: ['Accept-Encoding, Origin']
580 X-Content-Type-Options: [nosniff]
581 X-Frame-Options: [SAMEORIGIN]
582 X-Request-Id: [99c0cba3-b0e0-4763-84af-2353c25ebe60]
583 X-Runtime: ['0.029262']
584 X-XSS-Protection: [1; mode=block]
585 content-length: ['2']
586 status: {code: 200, message: OK}
587- request:
588 body: null
589 headers:
590 Accept: ['*/*']
591 Accept-Encoding: ['gzip, deflate']
592 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
593 Connection: [keep-alive]
594 Content-Length: ['0']
595 User-Agent: [python-requests/2.18.4]
596 method: DELETE
597 uri: http://localhost:3000/api/v1/statuses/99090169180477526
598 response:
599 body: {string: '{}'}
600 headers:
601 Cache-Control: ['max-age=0, private, must-revalidate']
602 Content-Type: [application/json; charset=utf-8]
603 ETag: [W/"0eeb7866ab8d2132c1f780df22673726"]
604 Transfer-Encoding: [chunked]
605 Vary: ['Accept-Encoding, Origin']
606 X-Content-Type-Options: [nosniff]
607 X-Frame-Options: [SAMEORIGIN]
608 X-Request-Id: [71b494de-d425-4d8a-8e73-7201145e3d38]
609 X-Runtime: ['0.038512']
610 X-XSS-Protection: [1; mode=block]
611 content-length: ['2']
612 status: {code: 200, message: OK}
613- request:
614 body: null
615 headers:
616 Accept: ['*/*']
617 Accept-Encoding: ['gzip, deflate']
618 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
619 Connection: [keep-alive]
620 Content-Length: ['0']
621 User-Agent: [python-requests/2.18.4]
622 method: DELETE
623 uri: http://localhost:3000/api/v1/statuses/99090169189662625
624 response:
625 body: {string: '{}'}
626 headers:
627 Cache-Control: ['max-age=0, private, must-revalidate']
628 Content-Type: [application/json; charset=utf-8]
629 ETag: [W/"0eeb7866ab8d2132c1f780df22673726"]
630 Transfer-Encoding: [chunked]
631 Vary: ['Accept-Encoding, Origin']
632 X-Content-Type-Options: [nosniff]
633 X-Frame-Options: [SAMEORIGIN]
634 X-Request-Id: [534aba73-4c70-4b04-951e-9217a5b568fa]
635 X-Runtime: ['0.032901']
636 X-XSS-Protection: [1; mode=block]
637 content-length: ['2']
638 status: {code: 200, message: OK}
639- request:
640 body: null
641 headers:
642 Accept: ['*/*']
643 Accept-Encoding: ['gzip, deflate']
644 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
645 Connection: [keep-alive]
646 Content-Length: ['0']
647 User-Agent: [python-requests/2.18.4]
648 method: DELETE
649 uri: http://localhost:3000/api/v1/statuses/99090169197421619
650 response:
651 body: {string: '{}'}
652 headers:
653 Cache-Control: ['max-age=0, private, must-revalidate']
654 Content-Type: [application/json; charset=utf-8]
655 ETag: [W/"0eeb7866ab8d2132c1f780df22673726"]
656 Transfer-Encoding: [chunked]
657 Vary: ['Accept-Encoding, Origin']
658 X-Content-Type-Options: [nosniff]
659 X-Frame-Options: [SAMEORIGIN]
660 X-Request-Id: [22488d4b-0de8-4073-9228-705e93b01a34]
661 X-Runtime: ['0.035844']
662 X-XSS-Protection: [1; mode=block]
663 content-length: ['2']
664 status: {code: 200, message: OK}
665- request:
666 body: null
667 headers:
668 Accept: ['*/*']
669 Accept-Encoding: ['gzip, deflate']
670 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
671 Connection: [keep-alive]
672 Content-Length: ['0']
673 User-Agent: [python-requests/2.18.4]
674 method: DELETE
675 uri: http://localhost:3000/api/v1/statuses/99090169205393273
676 response:
677 body: {string: '{}'}
678 headers:
679 Cache-Control: ['max-age=0, private, must-revalidate']
680 Content-Type: [application/json; charset=utf-8]
681 ETag: [W/"0eeb7866ab8d2132c1f780df22673726"]
682 Transfer-Encoding: [chunked]
683 Vary: ['Accept-Encoding, Origin']
684 X-Content-Type-Options: [nosniff]
685 X-Frame-Options: [SAMEORIGIN]
686 X-Request-Id: [ad2e5900-bb6b-4d96-adab-481b3d023ffe]
687 X-Runtime: ['0.032735']
688 X-XSS-Protection: [1; mode=block]
689 content-length: ['2']
690 status: {code: 200, message: OK}
691version: 1
diff --git a/tests/test_pagination.py b/tests/test_pagination.py
index 5b59143..44fafa1 100644
--- a/tests/test_pagination.py
+++ b/tests/test_pagination.py
@@ -1,6 +1,8 @@
1import pytest 1import pytest
2from contextlib import contextmanager 2from contextlib import contextmanager
3 3
4UNLIKELY_HASHTAG = "fgiztsshwiaqqiztpmmjbtvmescsculuvmgjgopwoeidbcrixp"
5
4 6
5@contextmanager 7@contextmanager
6def many_statuses(api, n=10, suffix=''): 8def many_statuses(api, n=10, suffix=''):
@@ -25,8 +27,18 @@ def test_fetch_next_previous(api):
25 27
26 28
27@pytest.mark.vcr() 29@pytest.mark.vcr()
30def test_fetch_next_previous_from_pagination_info(api):
31 account = api.account_verify_credentials()
32 with many_statuses(api):
33 statuses = api.account_statuses(account['id'], limit=5)
34 next_statuses = api.fetch_next(statuses[-1]['_pagination_next'])
35 assert next_statuses
36 previous_statuses = api.fetch_previous(next_statuses[0]['_pagination_prev'])
37 assert previous_statuses
38
39
40@pytest.mark.vcr()
28def test_fetch_remaining(api): 41def test_fetch_remaining(api):
29 UNLIKELY_HASHTAG = "fgiztsshwiaqqiztpmmjbtvmescsculuvmgjgopwoeidbcrixp"
30 with many_statuses(api, n=30, suffix=' #'+UNLIKELY_HASHTAG): 42 with many_statuses(api, n=30, suffix=' #'+UNLIKELY_HASHTAG):
31 hashtag = api.timeline_hashtag(UNLIKELY_HASHTAG, limit=10) 43 hashtag = api.timeline_hashtag(UNLIKELY_HASHTAG, limit=10)
32 hashtag_remaining = api.fetch_remaining(hashtag) 44 hashtag_remaining = api.fetch_remaining(hashtag)
Powered by cgit v1.2.3 (git 2.41.0)