aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcodl <[email protected]>2017-11-28 01:41:18 +0100
committercodl <[email protected]>2017-11-28 01:41:18 +0100
commit655a45e086f8c2e05be14dc55aa1fe366ffbb171 (patch)
tree7f74e83efe697082720bc966320a13ca05b4cf6e
parent38f99480dbeb6222ff8102163cfeca64634217a5 (diff)
downloadmastodon.py-655a45e086f8c2e05be14dc55aa1fe366ffbb171.tar.gz
add test for pagination
-rw-r--r--tests/cassettes/test_fetch_next_previous.yaml691
-rw-r--r--tests/test_pagination.py24
2 files changed, 715 insertions, 0 deletions
diff --git a/tests/cassettes/test_fetch_next_previous.yaml b/tests/cassettes/test_fetch_next_previous.yaml
new file mode 100644
index 0000000..03b696a
--- /dev/null
+++ b/tests/cassettes/test_fetch_next_previous.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_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":"1","username":"admin","acct":"admin","display_name":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":16,"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/"0b23966bf2a17efbd2f219cc1a1e20f9"]
18 Transfer-Encoding: [chunked]
19 Vary: ['Accept-Encoding, Origin']
20 X-Content-Type-Options: [nosniff]
21 X-Frame-Options: [SAMEORIGIN]
22 X-Request-Id: [c9233fd0-133a-4263-bfc1-76ab7f471018]
23 X-Runtime: ['0.020981']
24 X-XSS-Protection: [1; mode=block]
25 content-length: ['650']
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_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":"99079266443928158","created_at":"2017-11-28T00:40:27.144Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/99079266443928158","content":"\u003cp\u003eToot
41 number 0!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266443928158","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":"1","username":"admin","acct":"admin","display_name":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":17},"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/"ab80e03560c9e6fad36def062b218446"]
47 Transfer-Encoding: [chunked]
48 Vary: ['Accept-Encoding, Origin']
49 X-Content-Type-Options: [nosniff]
50 X-Frame-Options: [SAMEORIGIN]
51 X-Request-Id: [5f08ab8d-69b1-4da1-865d-fbcaaf824703]
52 X-Runtime: ['0.065867']
53 X-XSS-Protection: [1; mode=block]
54 content-length: ['1214']
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_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":"99079266449069171","created_at":"2017-11-28T00:40:27.221Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/99079266449069171","content":"\u003cp\u003eToot
70 number 1!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266449069171","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":"1","username":"admin","acct":"admin","display_name":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":18},"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/"9f09060a4280232f4df6747da285fc93"]
76 Transfer-Encoding: [chunked]
77 Vary: ['Accept-Encoding, Origin']
78 X-Content-Type-Options: [nosniff]
79 X-Frame-Options: [SAMEORIGIN]
80 X-Request-Id: [a62471ca-2e8a-45e7-b6bf-d4a68484f7e2]
81 X-Runtime: ['0.058284']
82 X-XSS-Protection: [1; mode=block]
83 content-length: ['1214']
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_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":"99079266453672782","created_at":"2017-11-28T00:40:27.291Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/99079266453672782","content":"\u003cp\u003eToot
99 number 2!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266453672782","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":"1","username":"admin","acct":"admin","display_name":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":19},"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/"5e707659b98b65d212d51572864f15eb"]
105 Transfer-Encoding: [chunked]
106 Vary: ['Accept-Encoding, Origin']
107 X-Content-Type-Options: [nosniff]
108 X-Frame-Options: [SAMEORIGIN]
109 X-Request-Id: [e8d9dc5c-4368-4d62-9b77-5171c61a505d]
110 X-Runtime: ['0.055975']
111 X-XSS-Protection: [1; mode=block]
112 content-length: ['1214']
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_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":"99079266458487196","created_at":"2017-11-28T00:40:27.368Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/99079266458487196","content":"\u003cp\u003eToot
128 number 3!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266458487196","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":"1","username":"admin","acct":"admin","display_name":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":20},"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/"8b111c1866c6778c095c84171a195c46"]
134 Transfer-Encoding: [chunked]
135 Vary: ['Accept-Encoding, Origin']
136 X-Content-Type-Options: [nosniff]
137 X-Frame-Options: [SAMEORIGIN]
138 X-Request-Id: [88575f0d-22eb-4bb0-b1f3-04b364ac8b8a]
139 X-Runtime: ['0.063460']
140 X-XSS-Protection: [1; mode=block]
141 content-length: ['1214']
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_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":"99079266463508673","created_at":"2017-11-28T00:40:27.441Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/99079266463508673","content":"\u003cp\u003eToot
157 number 4!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266463508673","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":"1","username":"admin","acct":"admin","display_name":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":21},"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/"adabc0d5a0513decee43e97f9a073f58"]
163 Transfer-Encoding: [chunked]
164 Vary: ['Accept-Encoding, Origin']
165 X-Content-Type-Options: [nosniff]
166 X-Frame-Options: [SAMEORIGIN]
167 X-Request-Id: [6a017227-82e0-402a-82d0-212d607b71c1]
168 X-Runtime: ['0.056678']
169 X-XSS-Protection: [1; mode=block]
170 content-length: ['1214']
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_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":"99079266468357199","created_at":"2017-11-28T00:40:27.515Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/99079266468357199","content":"\u003cp\u003eToot
186 number 5!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266468357199","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":"1","username":"admin","acct":"admin","display_name":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":22},"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/"7dae03604470824cfb8100fa2ee86b8d"]
192 Transfer-Encoding: [chunked]
193 Vary: ['Accept-Encoding, Origin']
194 X-Content-Type-Options: [nosniff]
195 X-Frame-Options: [SAMEORIGIN]
196 X-Request-Id: [76739fd1-b70e-4b34-839a-29cc5155eaa5]
197 X-Runtime: ['0.060970']
198 X-XSS-Protection: [1; mode=block]
199 content-length: ['1214']
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_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":"99079266473226126","created_at":"2017-11-28T00:40:27.590Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/99079266473226126","content":"\u003cp\u003eToot
215 number 6!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266473226126","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":"1","username":"admin","acct":"admin","display_name":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":23},"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/"ca8426a2d601cc604f948bb8298c112d"]
221 Transfer-Encoding: [chunked]
222 Vary: ['Accept-Encoding, Origin']
223 X-Content-Type-Options: [nosniff]
224 X-Frame-Options: [SAMEORIGIN]
225 X-Request-Id: [97c13c11-856c-41a9-a359-a38d042f8d9f]
226 X-Runtime: ['0.056580']
227 X-XSS-Protection: [1; mode=block]
228 content-length: ['1214']
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_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":"99079266477946208","created_at":"2017-11-28T00:40:27.663Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/99079266477946208","content":"\u003cp\u003eToot
244 number 7!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266477946208","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":"1","username":"admin","acct":"admin","display_name":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":24},"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/"8c097f3e266820095fd8f153501c53c0"]
250 Transfer-Encoding: [chunked]
251 Vary: ['Accept-Encoding, Origin']
252 X-Content-Type-Options: [nosniff]
253 X-Frame-Options: [SAMEORIGIN]
254 X-Request-Id: [c3990376-f7e9-476c-b3ee-579af6bed528]
255 X-Runtime: ['0.060760']
256 X-XSS-Protection: [1; mode=block]
257 content-length: ['1214']
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_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":"99079266482935881","created_at":"2017-11-28T00:40:27.739Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/99079266482935881","content":"\u003cp\u003eToot
273 number 8!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266482935881","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":"1","username":"admin","acct":"admin","display_name":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":25},"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/"5cefc774d6133f67dcc7dd27ff08a281"]
279 Transfer-Encoding: [chunked]
280 Vary: ['Accept-Encoding, Origin']
281 X-Content-Type-Options: [nosniff]
282 X-Frame-Options: [SAMEORIGIN]
283 X-Request-Id: [8ade0681-aed1-4d97-8e5f-80babe501e35]
284 X-Runtime: ['0.056293']
285 X-XSS-Protection: [1; mode=block]
286 content-length: ['1214']
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_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":"99079266487775971","created_at":"2017-11-28T00:40:27.813Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/99079266487775971","content":"\u003cp\u003eToot
302 number 9!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266487775971","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":"1","username":"admin","acct":"admin","display_name":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":26},"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/"bd093b8c90d09ef1cb572b547f5aba34"]
308 Transfer-Encoding: [chunked]
309 Vary: ['Accept-Encoding, Origin']
310 X-Content-Type-Options: [nosniff]
311 X-Frame-Options: [SAMEORIGIN]
312 X-Request-Id: [4325fdfa-46fb-4292-bcb7-ebeacbc73354]
313 X-Runtime: ['0.059616']
314 X-XSS-Protection: [1; mode=block]
315 content-length: ['1214']
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_TOKEN]
323 Connection: [keep-alive]
324 User-Agent: [python-requests/2.18.4]
325 method: GET
326 uri: http://localhost:3000/api/v1/accounts/1/statuses?limit=5
327 response:
328 body: {string: '[{"id":"99079266487775971","created_at":"2017-11-28T00:40:27.813Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/99079266487775971","content":"\u003cp\u003eToot
329 number 9!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266487775971","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":"1","username":"admin","acct":"admin","display_name":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":26},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99079266482935881","created_at":"2017-11-28T00:40:27.739Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/99079266482935881","content":"\u003cp\u003eToot
331 number 8!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266482935881","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":"1","username":"admin","acct":"admin","display_name":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":26},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99079266477946208","created_at":"2017-11-28T00:40:27.663Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/99079266477946208","content":"\u003cp\u003eToot
333 number 7!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266477946208","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":"1","username":"admin","acct":"admin","display_name":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":26},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99079266473226126","created_at":"2017-11-28T00:40:27.590Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/99079266473226126","content":"\u003cp\u003eToot
335 number 6!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266473226126","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":"1","username":"admin","acct":"admin","display_name":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":26},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99079266468357199","created_at":"2017-11-28T00:40:27.515Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/99079266468357199","content":"\u003cp\u003eToot
337 number 5!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266468357199","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":"1","username":"admin","acct":"admin","display_name":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":26},"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/"3132abec6f7690c9856cfdabfc615e13"]
343 Link: ['<http://localhost:3000/api/v1/accounts/1/statuses?limit=5&max_id=99079266468357199>;
344 rel="next", <http://localhost:3000/api/v1/accounts/1/statuses?limit=5&since_id=99079266487775971>;
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: [80031a41-25af-4d52-a683-05dfcb823934]
351 X-Runtime: ['0.072870']
352 X-XSS-Protection: [1; mode=block]
353 content-length: ['6076']
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_TOKEN]
361 Connection: [keep-alive]
362 User-Agent: [python-requests/2.18.4]
363 method: GET
364 uri: http://localhost:3000/api/v1/accounts/1/statuses?limit=5&max_id=99079266468357199
365 response:
366 body: {string: '[{"id":"99079266463508673","created_at":"2017-11-28T00:40:27.441Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/99079266463508673","content":"\u003cp\u003eToot
367 number 4!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266463508673","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":"1","username":"admin","acct":"admin","display_name":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":26},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99079266458487196","created_at":"2017-11-28T00:40:27.368Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/99079266458487196","content":"\u003cp\u003eToot
369 number 3!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266458487196","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":"1","username":"admin","acct":"admin","display_name":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":26},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99079266453672782","created_at":"2017-11-28T00:40:27.291Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/99079266453672782","content":"\u003cp\u003eToot
371 number 2!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266453672782","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":"1","username":"admin","acct":"admin","display_name":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":26},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99079266449069171","created_at":"2017-11-28T00:40:27.221Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/99079266449069171","content":"\u003cp\u003eToot
373 number 1!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266449069171","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":"1","username":"admin","acct":"admin","display_name":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":26},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99079266443928158","created_at":"2017-11-28T00:40:27.144Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/99079266443928158","content":"\u003cp\u003eToot
375 number 0!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266443928158","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":"1","username":"admin","acct":"admin","display_name":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":26},"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/"6a5bd8ad4f648768d86a1a44297d4306"]
381 Link: ['<http://localhost:3000/api/v1/accounts/1/statuses?limit=5&max_id=99079266443928158>;
382 rel="next", <http://localhost:3000/api/v1/accounts/1/statuses?limit=5&since_id=99079266463508673>;
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: [a67304e0-6c75-45a7-91eb-b520a571c8bd]
389 X-Runtime: ['0.074569']
390 X-XSS-Protection: [1; mode=block]
391 content-length: ['6076']
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_TOKEN]
399 Connection: [keep-alive]
400 User-Agent: [python-requests/2.18.4]
401 method: GET
402 uri: http://localhost:3000/api/v1/accounts/1/statuses?limit=5&since_id=99079266463508673
403 response:
404 body: {string: '[{"id":"99079266487775971","created_at":"2017-11-28T00:40:27.813Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/99079266487775971","content":"\u003cp\u003eToot
405 number 9!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266487775971","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":"1","username":"admin","acct":"admin","display_name":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":26},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99079266482935881","created_at":"2017-11-28T00:40:27.739Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/99079266482935881","content":"\u003cp\u003eToot
407 number 8!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266482935881","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":"1","username":"admin","acct":"admin","display_name":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":26},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99079266477946208","created_at":"2017-11-28T00:40:27.663Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/99079266477946208","content":"\u003cp\u003eToot
409 number 7!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266477946208","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":"1","username":"admin","acct":"admin","display_name":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":26},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99079266473226126","created_at":"2017-11-28T00:40:27.590Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/99079266473226126","content":"\u003cp\u003eToot
411 number 6!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266473226126","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":"1","username":"admin","acct":"admin","display_name":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":26},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99079266468357199","created_at":"2017-11-28T00:40:27.515Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/99079266468357199","content":"\u003cp\u003eToot
413 number 5!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266468357199","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":"1","username":"admin","acct":"admin","display_name":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":26},"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/"373bc7dd35f45b24e6eb59480b80735e"]
419 Link: ['<http://localhost:3000/api/v1/accounts/1/statuses?limit=5&max_id=99079266468357199>;
420 rel="next", <http://localhost:3000/api/v1/accounts/1/statuses?limit=5&since_id=99079266487775971>;
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: [cc6ab6a9-d2a3-4459-bce5-e59022342e9c]
427 X-Runtime: ['0.078577']
428 X-XSS-Protection: [1; mode=block]
429 content-length: ['6076']
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_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/99079266443928158
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/"5dd893de28af93ba1caa26870546fdff"]
448 Transfer-Encoding: [chunked]
449 Vary: ['Accept-Encoding, Origin']
450 X-Content-Type-Options: [nosniff]
451 X-Frame-Options: [SAMEORIGIN]
452 X-Request-Id: [f6b74838-006a-4e4e-8d6d-c1225462c2ee]
453 X-Runtime: ['0.017958']
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_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/99079266449069171
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/"5dd893de28af93ba1caa26870546fdff"]
474 Transfer-Encoding: [chunked]
475 Vary: ['Accept-Encoding, Origin']
476 X-Content-Type-Options: [nosniff]
477 X-Frame-Options: [SAMEORIGIN]
478 X-Request-Id: [62be2ede-17e2-4c99-a46c-d2e40dbc422f]
479 X-Runtime: ['0.017751']
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_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/99079266453672782
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/"5dd893de28af93ba1caa26870546fdff"]
500 Transfer-Encoding: [chunked]
501 Vary: ['Accept-Encoding, Origin']
502 X-Content-Type-Options: [nosniff]
503 X-Frame-Options: [SAMEORIGIN]
504 X-Request-Id: [2a2383b5-7c78-43ff-8b20-ea379546f309]
505 X-Runtime: ['0.017311']
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_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/99079266458487196
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/"5dd893de28af93ba1caa26870546fdff"]
526 Transfer-Encoding: [chunked]
527 Vary: ['Accept-Encoding, Origin']
528 X-Content-Type-Options: [nosniff]
529 X-Frame-Options: [SAMEORIGIN]
530 X-Request-Id: [264bba1c-6f8b-4ffb-b5ca-e790049dca9c]
531 X-Runtime: ['0.017539']
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_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/99079266463508673
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/"5dd893de28af93ba1caa26870546fdff"]
552 Transfer-Encoding: [chunked]
553 Vary: ['Accept-Encoding, Origin']
554 X-Content-Type-Options: [nosniff]
555 X-Frame-Options: [SAMEORIGIN]
556 X-Request-Id: [19dd0bbc-3117-4f2d-a5cf-728a51fe2580]
557 X-Runtime: ['0.016431']
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_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/99079266468357199
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/"5dd893de28af93ba1caa26870546fdff"]
578 Transfer-Encoding: [chunked]
579 Vary: ['Accept-Encoding, Origin']
580 X-Content-Type-Options: [nosniff]
581 X-Frame-Options: [SAMEORIGIN]
582 X-Request-Id: [6b06cffa-8525-4bc1-b2e7-1d961aab86c8]
583 X-Runtime: ['0.017450']
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_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/99079266473226126
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/"5dd893de28af93ba1caa26870546fdff"]
604 Transfer-Encoding: [chunked]
605 Vary: ['Accept-Encoding, Origin']
606 X-Content-Type-Options: [nosniff]
607 X-Frame-Options: [SAMEORIGIN]
608 X-Request-Id: [32ec46dd-30da-49e0-b274-6502febaf918]
609 X-Runtime: ['0.017414']
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_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/99079266477946208
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/"5dd893de28af93ba1caa26870546fdff"]
630 Transfer-Encoding: [chunked]
631 Vary: ['Accept-Encoding, Origin']
632 X-Content-Type-Options: [nosniff]
633 X-Frame-Options: [SAMEORIGIN]
634 X-Request-Id: [2ba3e408-6205-4ffa-ba7e-335e21e5a2b3]
635 X-Runtime: ['0.022490']
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_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/99079266482935881
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/"5dd893de28af93ba1caa26870546fdff"]
656 Transfer-Encoding: [chunked]
657 Vary: ['Accept-Encoding, Origin']
658 X-Content-Type-Options: [nosniff]
659 X-Frame-Options: [SAMEORIGIN]
660 X-Request-Id: [a3f3cfc2-6642-433d-b133-0d1d93ca6b25]
661 X-Runtime: ['0.019183']
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_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/99079266487775971
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/"5dd893de28af93ba1caa26870546fdff"]
682 Transfer-Encoding: [chunked]
683 Vary: ['Accept-Encoding, Origin']
684 X-Content-Type-Options: [nosniff]
685 X-Frame-Options: [SAMEORIGIN]
686 X-Request-Id: [051f2e76-14c4-467a-a5bc-fc0e61b160ba]
687 X-Runtime: ['0.018877']
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
new file mode 100644
index 0000000..30bdf89
--- /dev/null
+++ b/tests/test_pagination.py
@@ -0,0 +1,24 @@
1import pytest
2from contextlib import contextmanager
3
4
5@contextmanager
6def many_statuses(api, n=10):
7 statuses = list()
8 for i in range(n):
9 status = api.status_post("Toot number {}!".format(i))
10 statuses.append(status)
11 yield statuses
12 for status in statuses:
13 api.status_delete(status['id'])
14
15
16@pytest.mark.vcr()
17def test_fetch_next_previous(api):
18 account = api.account_verify_credentials()
19 with many_statuses(api):
20 statuses = api.account_statuses(account['id'], limit=5)
21 next_statuses = api.fetch_next(statuses)
22 assert next_statuses
23 previous_statuses = api.fetch_previous(next_statuses)
24 assert previous_statuses
Powered by cgit v1.2.3 (git 2.41.0)