aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAljoscha Rittner <[email protected]>2022-06-24 17:30:29 +0200
committerGitHub <[email protected]>2022-06-24 17:30:29 +0200
commitc9008a1cdcd31ba47c10d7b6f35cc7aceffe81f5 (patch)
treed1e450afcca6760d53d340359be6cbc26e35137d
parent002c6511a7c6a340efdaee15849a31afa38871fc (diff)
parente98b033646b0d9d7851d2a0e736ff6f1b60b0ef8 (diff)
downloadmastodon.py-c9008a1cdcd31ba47c10d7b6f35cc7aceffe81f5.tar.gz
Merge pull request #233 from arittner/master
Changes the storage for pagination information
-rw-r--r--mastodon/Mastodon.py51
-rw-r--r--tests/cassettes/test_domain_blocks.yaml7
-rw-r--r--tests/cassettes/test_fetch_next_previous_from_pagination_info_oldstyle.yaml749
-rw-r--r--tests/test_pagination.py28
4 files changed, 823 insertions, 12 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py
index 8b0afb3..0922a6f 100644
--- a/mastodon/Mastodon.py
+++ b/mastodon/Mastodon.py
@@ -120,10 +120,27 @@ class AttribAccessDict(dict):
120 raise AttributeError("Attribute-style access is read only") 120 raise AttributeError("Attribute-style access is read only")
121 super(AttribAccessDict, self).__setattr__(attr, val) 121 super(AttribAccessDict, self).__setattr__(attr, val)
122 122
123
123### 124###
124# The actual Mastodon class 125# List helper class.
126# Defined at top level so it can be pickled.
125### 127###
128class AttribAccessList(list):
129 def __getattr__(self, attr):
130 if attr in self:
131 return self[attr]
132 else:
133 raise AttributeError("Attribute not found: " + str(attr))
134
135 def __setattr__(self, attr, val):
136 if attr in self:
137 raise AttributeError("Attribute-style access is read only")
138 super(AttribAccessList, self).__setattr__(attr, val)
139
126 140
141###
142# The actual Mastodon class
143###
127class Mastodon: 144class Mastodon:
128 """ 145 """
129 Thorough and easy to use Mastodon 146 Thorough and easy to use Mastodon
@@ -3050,8 +3067,8 @@ class Mastodon:
3050 Returns the next page or None if no further data is available. 3067 Returns the next page or None if no further data is available.
3051 """ 3068 """
3052 if isinstance(previous_page, list) and len(previous_page) != 0: 3069 if isinstance(previous_page, list) and len(previous_page) != 0:
3053 if hasattr(previous_page[-1], '_pagination_next'): 3070 if hasattr(previous_page, '_pagination_next'):
3054 params = copy.deepcopy(previous_page[-1]._pagination_next) 3071 params = copy.deepcopy(previous_page._pagination_next)
3055 else: 3072 else:
3056 return None 3073 return None
3057 else: 3074 else:
@@ -3074,8 +3091,8 @@ class Mastodon:
3074 Returns the previous page or None if no further data is available. 3091 Returns the previous page or None if no further data is available.
3075 """ 3092 """
3076 if isinstance(next_page, list) and len(next_page) != 0: 3093 if isinstance(next_page, list) and len(next_page) != 0:
3077 if hasattr(next_page[0], '_pagination_prev'): 3094 if hasattr(next_page, '_pagination_prev'):
3078 params = copy.deepcopy(next_page[0]._pagination_prev) 3095 params = copy.deepcopy(next_page._pagination_prev)
3079 else: 3096 else:
3080 return None 3097 return None
3081 else: 3098 else:
@@ -3453,6 +3470,7 @@ class Mastodon:
3453 if isinstance(response, list) and \ 3470 if isinstance(response, list) and \
3454 'Link' in response_object.headers and \ 3471 'Link' in response_object.headers and \
3455 response_object.headers['Link'] != "": 3472 response_object.headers['Link'] != "":
3473 response = AttribAccessList(response)
3456 tmp_urls = requests.utils.parse_header_links( 3474 tmp_urls = requests.utils.parse_header_links(
3457 response_object.headers['Link'].rstrip('>').replace('>,<', ',<')) 3475 response_object.headers['Link'].rstrip('>').replace('>,<', ',<'))
3458 for url in tmp_urls: 3476 for url in tmp_urls:
@@ -3477,7 +3495,12 @@ class Mastodon:
3477 del next_params['since_id'] 3495 del next_params['since_id']
3478 if "min_id" in next_params: 3496 if "min_id" in next_params:
3479 del next_params['min_id'] 3497 del next_params['min_id']
3480 response[-1]._pagination_next = next_params 3498 response._pagination_next = next_params
3499
3500 # Maybe other API users rely on the pagination info in the last item
3501 # Will be removed in future
3502 if isinstance(response[-1], AttribAccessDict):
3503 response[-1]._pagination_next = next_params
3481 3504
3482 if url['rel'] == 'prev': 3505 if url['rel'] == 'prev':
3483 # Be paranoid and extract since_id or min_id specifically 3506 # Be paranoid and extract since_id or min_id specifically
@@ -3496,8 +3519,13 @@ class Mastodon:
3496 prev_params['since_id'] = since_id 3519 prev_params['since_id'] = since_id
3497 if "max_id" in prev_params: 3520 if "max_id" in prev_params:
3498 del prev_params['max_id'] 3521 del prev_params['max_id']
3499 response[0]._pagination_prev = prev_params 3522 response._pagination_prev = prev_params
3500 3523
3524 # Maybe other API users rely on the pagination info in the first item
3525 # Will be removed in future
3526 if isinstance(response[0], AttribAccessDict):
3527 response[0]._pagination_prev = prev_params
3528
3501 # New and fantastico (post-2.6.0): min_id pagination 3529 # New and fantastico (post-2.6.0): min_id pagination
3502 matchgroups = re.search(r"[?&]min_id=([^&]+)", prev_url) 3530 matchgroups = re.search(r"[?&]min_id=([^&]+)", prev_url)
3503 if matchgroups: 3531 if matchgroups:
@@ -3511,7 +3539,12 @@ class Mastodon:
3511 prev_params['min_id'] = min_id 3539 prev_params['min_id'] = min_id
3512 if "max_id" in prev_params: 3540 if "max_id" in prev_params:
3513 del prev_params['max_id'] 3541 del prev_params['max_id']
3514 response[0]._pagination_prev = prev_params 3542 response._pagination_prev = prev_params
3543
3544 # Maybe other API users rely on the pagination info in the first item
3545 # Will be removed in future
3546 if isinstance(response[0], AttribAccessDict):
3547 response[0]._pagination_prev = prev_params
3515 3548
3516 return response 3549 return response
3517 3550
diff --git a/tests/cassettes/test_domain_blocks.yaml b/tests/cassettes/test_domain_blocks.yaml
index 8889bb1..041541e 100644
--- a/tests/cassettes/test_domain_blocks.yaml
+++ b/tests/cassettes/test_domain_blocks.yaml
@@ -10,10 +10,13 @@ interactions:
10 method: GET 10 method: GET
11 uri: http://localhost:3000/api/v1/domain_blocks 11 uri: http://localhost:3000/api/v1/domain_blocks
12 response: 12 response:
13 body: {string: '[]'} 13 body: {string: '["example.com"]'}
14 headers: 14 headers:
15 Cache-Control: ['no-cache, no-store'] 15 Cache-Control: ['no-cache, no-store']
16 Content-Type: [application/json; charset=utf-8] 16 Content-Type: [application/json; charset=utf-8]
17 Link: ['<http://localhost:3000/api/v1/domain_blocks?max_id=10023>;
18 rel="next", <http://localhost:3000/api/v1/domain_blocks?min_id=10021>;
19 rel="prev"']
17 Referrer-Policy: [strict-origin-when-cross-origin] 20 Referrer-Policy: [strict-origin-when-cross-origin]
18 Transfer-Encoding: [chunked] 21 Transfer-Encoding: [chunked]
19 Vary: ['Accept-Encoding, Origin'] 22 Vary: ['Accept-Encoding, Origin']
@@ -24,6 +27,6 @@ interactions:
24 X-Request-Id: [79ec8c37-a374-47e4-a698-a8b8511ca20f] 27 X-Request-Id: [79ec8c37-a374-47e4-a698-a8b8511ca20f]
25 X-Runtime: ['0.098492'] 28 X-Runtime: ['0.098492']
26 X-XSS-Protection: [1; mode=block] 29 X-XSS-Protection: [1; mode=block]
27 content-length: ['2'] 30 content-length: ['15']
28 status: {code: 200, message: OK} 31 status: {code: 200, message: OK}
29version: 1 32version: 1
diff --git a/tests/cassettes/test_fetch_next_previous_from_pagination_info_oldstyle.yaml b/tests/cassettes/test_fetch_next_previous_from_pagination_info_oldstyle.yaml
new file mode 100644
index 0000000..7038e45
--- /dev/null
+++ b/tests/cassettes/test_fetch_next_previous_from_pagination_info_oldstyle.yaml
@@ -0,0 +1,749 @@
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,"bot":false,"discoverable":false,"group":false,"created_at":"2020-02-22T20:26:54.402Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost/@mastodonpy_test","avatar":"http://localhost/avatars/original/missing.png","avatar_static":"http://localhost/avatars/original/missing.png","header":"http://localhost/headers/original/missing.png","header_static":"http://localhost/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":1,"last_status_at":"2020-02-22","source":{"privacy":"public","sensitive":false,"language":null,"note":"","fields":[],"follow_requests_count":0},"emojis":[],"fields":[]}'}
14 headers:
15 Cache-Control: ['no-cache, no-store']
16 Content-Type: [application/json; charset=utf-8]
17 Referrer-Policy: [strict-origin-when-cross-origin]
18 Transfer-Encoding: [chunked]
19 Vary: ['Accept-Encoding, Origin']
20 X-Content-Type-Options: [nosniff]
21 X-Download-Options: [noopen]
22 X-Frame-Options: [SAMEORIGIN]
23 X-Permitted-Cross-Domain-Policies: [none]
24 X-Request-Id: [ae32b16c-712a-4109-88b9-392036a21925]
25 X-Runtime: ['0.651439']
26 X-XSS-Protection: [1; mode=block]
27 content-length: ['745']
28 status: {code: 200, message: OK}
29 - request:
30 body: status=Toot+number+0%21
31 headers:
32 Accept: ['*/*']
33 Accept-Encoding: ['gzip, deflate']
34 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
35 Connection: [keep-alive]
36 Content-Length: ['23']
37 Content-Type: [application/x-www-form-urlencoded]
38 User-Agent: [python-requests/2.18.4]
39 method: POST
40 uri: http://localhost:3000/api/v1/statuses
41 response:
42 body: {string: '{"id":"103704149189751466","created_at":"2020-02-22T19:28:57.717Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost/users/mastodonpy_test/statuses/103704149189751466","url":"http://localhost/@mastodonpy_test/103704149189751466","replies_count":0,"reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"content":"\u003cp\u003eToot
43 number 0!\u003c/p\u003e","reblog":null,"application":{"name":"Mastodon.py
44 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"bot":false,"discoverable":false,"group":false,"created_at":"2020-02-22T20:26:54.402Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost/@mastodonpy_test","avatar":"http://localhost/avatars/original/missing.png","avatar_static":"http://localhost/avatars/original/missing.png","header":"http://localhost/headers/original/missing.png","header_static":"http://localhost/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":2,"last_status_at":"2020-02-22","emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null}'}
45 headers:
46 Cache-Control: ['no-cache, no-store']
47 Content-Type: [application/json; charset=utf-8]
48 Referrer-Policy: [strict-origin-when-cross-origin]
49 Transfer-Encoding: [chunked]
50 Vary: ['Accept-Encoding, Origin']
51 X-Content-Type-Options: [nosniff]
52 X-Download-Options: [noopen]
53 X-Frame-Options: [SAMEORIGIN]
54 X-Permitted-Cross-Domain-Policies: [none]
55 X-Request-Id: [f17c9f1b-ccda-4ffb-8677-931a2bcd778b]
56 X-Runtime: ['0.801649']
57 X-XSS-Protection: [1; mode=block]
58 content-length: ['1329']
59 status: {code: 200, message: OK}
60 - request:
61 body: status=Toot+number+1%21
62 headers:
63 Accept: ['*/*']
64 Accept-Encoding: ['gzip, deflate']
65 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
66 Connection: [keep-alive]
67 Content-Length: ['23']
68 Content-Type: [application/x-www-form-urlencoded]
69 User-Agent: [python-requests/2.18.4]
70 method: POST
71 uri: http://localhost:3000/api/v1/statuses
72 response:
73 body: {string: '{"id":"103704149240204204","created_at":"2020-02-22T19:28:58.181Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost/users/mastodonpy_test/statuses/103704149240204204","url":"http://localhost/@mastodonpy_test/103704149240204204","replies_count":0,"reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"content":"\u003cp\u003eToot
74 number 1!\u003c/p\u003e","reblog":null,"application":{"name":"Mastodon.py
75 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"bot":false,"discoverable":false,"group":false,"created_at":"2020-02-22T20:26:54.402Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost/@mastodonpy_test","avatar":"http://localhost/avatars/original/missing.png","avatar_static":"http://localhost/avatars/original/missing.png","header":"http://localhost/headers/original/missing.png","header_static":"http://localhost/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":3,"last_status_at":"2020-02-22","emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null}'}
76 headers:
77 Cache-Control: ['no-cache, no-store']
78 Content-Type: [application/json; charset=utf-8]
79 Referrer-Policy: [strict-origin-when-cross-origin]
80 Transfer-Encoding: [chunked]
81 Vary: ['Accept-Encoding, Origin']
82 X-Content-Type-Options: [nosniff]
83 X-Download-Options: [noopen]
84 X-Frame-Options: [SAMEORIGIN]
85 X-Permitted-Cross-Domain-Policies: [none]
86 X-Request-Id: [d3af53b9-a9f0-41ce-b0c4-1a69b7e7f18a]
87 X-Runtime: ['0.211565']
88 X-XSS-Protection: [1; mode=block]
89 content-length: ['1329']
90 status: {code: 200, message: OK}
91 - request:
92 body: status=Toot+number+2%21
93 headers:
94 Accept: ['*/*']
95 Accept-Encoding: ['gzip, deflate']
96 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
97 Connection: [keep-alive]
98 Content-Length: ['23']
99 Content-Type: [application/x-www-form-urlencoded]
100 User-Agent: [python-requests/2.18.4]
101 method: POST
102 uri: http://localhost:3000/api/v1/statuses
103 response:
104 body: {string: '{"id":"103704149255716248","created_at":"2020-02-22T19:28:58.413Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost/users/mastodonpy_test/statuses/103704149255716248","url":"http://localhost/@mastodonpy_test/103704149255716248","replies_count":0,"reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"content":"\u003cp\u003eToot
105 number 2!\u003c/p\u003e","reblog":null,"application":{"name":"Mastodon.py
106 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"bot":false,"discoverable":false,"group":false,"created_at":"2020-02-22T20:26:54.402Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost/@mastodonpy_test","avatar":"http://localhost/avatars/original/missing.png","avatar_static":"http://localhost/avatars/original/missing.png","header":"http://localhost/headers/original/missing.png","header_static":"http://localhost/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":4,"last_status_at":"2020-02-22","emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null}'}
107 headers:
108 Cache-Control: ['no-cache, no-store']
109 Content-Type: [application/json; charset=utf-8]
110 Referrer-Policy: [strict-origin-when-cross-origin]
111 Transfer-Encoding: [chunked]
112 Vary: ['Accept-Encoding, Origin']
113 X-Content-Type-Options: [nosniff]
114 X-Download-Options: [noopen]
115 X-Frame-Options: [SAMEORIGIN]
116 X-Permitted-Cross-Domain-Policies: [none]
117 X-Request-Id: [dc3327da-8fc5-46c6-8759-8953392d450d]
118 X-Runtime: ['0.211682']
119 X-XSS-Protection: [1; mode=block]
120 content-length: ['1329']
121 status: {code: 200, message: OK}
122 - request:
123 body: status=Toot+number+3%21
124 headers:
125 Accept: ['*/*']
126 Accept-Encoding: ['gzip, deflate']
127 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
128 Connection: [keep-alive]
129 Content-Length: ['23']
130 Content-Type: [application/x-www-form-urlencoded]
131 User-Agent: [python-requests/2.18.4]
132 method: POST
133 uri: http://localhost:3000/api/v1/statuses
134 response:
135 body: {string: '{"id":"103704149270849591","created_at":"2020-02-22T19:28:58.643Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost/users/mastodonpy_test/statuses/103704149270849591","url":"http://localhost/@mastodonpy_test/103704149270849591","replies_count":0,"reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"content":"\u003cp\u003eToot
136 number 3!\u003c/p\u003e","reblog":null,"application":{"name":"Mastodon.py
137 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"bot":false,"discoverable":false,"group":false,"created_at":"2020-02-22T20:26:54.402Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost/@mastodonpy_test","avatar":"http://localhost/avatars/original/missing.png","avatar_static":"http://localhost/avatars/original/missing.png","header":"http://localhost/headers/original/missing.png","header_static":"http://localhost/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":5,"last_status_at":"2020-02-22","emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null}'}
138 headers:
139 Cache-Control: ['no-cache, no-store']
140 Content-Type: [application/json; charset=utf-8]
141 Referrer-Policy: [strict-origin-when-cross-origin]
142 Transfer-Encoding: [chunked]
143 Vary: ['Accept-Encoding, Origin']
144 X-Content-Type-Options: [nosniff]
145 X-Download-Options: [noopen]
146 X-Frame-Options: [SAMEORIGIN]
147 X-Permitted-Cross-Domain-Policies: [none]
148 X-Request-Id: [3b34502f-358b-4f69-a8a7-b72cee3056a0]
149 X-Runtime: ['0.205497']
150 X-XSS-Protection: [1; mode=block]
151 content-length: ['1329']
152 status: {code: 200, message: OK}
153 - request:
154 body: status=Toot+number+4%21
155 headers:
156 Accept: ['*/*']
157 Accept-Encoding: ['gzip, deflate']
158 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
159 Connection: [keep-alive]
160 Content-Length: ['23']
161 Content-Type: [application/x-www-form-urlencoded]
162 User-Agent: [python-requests/2.18.4]
163 method: POST
164 uri: http://localhost:3000/api/v1/statuses
165 response:
166 body: {string: '{"id":"103704149285153724","created_at":"2020-02-22T19:28:58.863Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost/users/mastodonpy_test/statuses/103704149285153724","url":"http://localhost/@mastodonpy_test/103704149285153724","replies_count":0,"reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"content":"\u003cp\u003eToot
167 number 4!\u003c/p\u003e","reblog":null,"application":{"name":"Mastodon.py
168 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"bot":false,"discoverable":false,"group":false,"created_at":"2020-02-22T20:26:54.402Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost/@mastodonpy_test","avatar":"http://localhost/avatars/original/missing.png","avatar_static":"http://localhost/avatars/original/missing.png","header":"http://localhost/headers/original/missing.png","header_static":"http://localhost/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":6,"last_status_at":"2020-02-22","emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null}'}
169 headers:
170 Cache-Control: ['no-cache, no-store']
171 Content-Type: [application/json; charset=utf-8]
172 Referrer-Policy: [strict-origin-when-cross-origin]
173 Transfer-Encoding: [chunked]
174 Vary: ['Accept-Encoding, Origin']
175 X-Content-Type-Options: [nosniff]
176 X-Download-Options: [noopen]
177 X-Frame-Options: [SAMEORIGIN]
178 X-Permitted-Cross-Domain-Policies: [none]
179 X-Request-Id: [49cc87eb-ae66-4bbb-8fca-79277c82b4b6]
180 X-Runtime: ['0.214698']
181 X-XSS-Protection: [1; mode=block]
182 content-length: ['1329']
183 status: {code: 200, message: OK}
184 - request:
185 body: status=Toot+number+5%21
186 headers:
187 Accept: ['*/*']
188 Accept-Encoding: ['gzip, deflate']
189 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
190 Connection: [keep-alive]
191 Content-Length: ['23']
192 Content-Type: [application/x-www-form-urlencoded]
193 User-Agent: [python-requests/2.18.4]
194 method: POST
195 uri: http://localhost:3000/api/v1/statuses
196 response:
197 body: {string: '{"id":"103704149300069225","created_at":"2020-02-22T19:28:59.095Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost/users/mastodonpy_test/statuses/103704149300069225","url":"http://localhost/@mastodonpy_test/103704149300069225","replies_count":0,"reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"content":"\u003cp\u003eToot
198 number 5!\u003c/p\u003e","reblog":null,"application":{"name":"Mastodon.py
199 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"bot":false,"discoverable":false,"group":false,"created_at":"2020-02-22T20:26:54.402Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost/@mastodonpy_test","avatar":"http://localhost/avatars/original/missing.png","avatar_static":"http://localhost/avatars/original/missing.png","header":"http://localhost/headers/original/missing.png","header_static":"http://localhost/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":7,"last_status_at":"2020-02-22","emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null}'}
200 headers:
201 Cache-Control: ['no-cache, no-store']
202 Content-Type: [application/json; charset=utf-8]
203 Referrer-Policy: [strict-origin-when-cross-origin]
204 Transfer-Encoding: [chunked]
205 Vary: ['Accept-Encoding, Origin']
206 X-Content-Type-Options: [nosniff]
207 X-Download-Options: [noopen]
208 X-Frame-Options: [SAMEORIGIN]
209 X-Permitted-Cross-Domain-Policies: [none]
210 X-Request-Id: [c0aed740-e674-4ca5-8e98-f4cba0044418]
211 X-Runtime: ['0.225727']
212 X-XSS-Protection: [1; mode=block]
213 content-length: ['1329']
214 status: {code: 200, message: OK}
215 - request:
216 body: status=Toot+number+6%21
217 headers:
218 Accept: ['*/*']
219 Accept-Encoding: ['gzip, deflate']
220 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
221 Connection: [keep-alive]
222 Content-Length: ['23']
223 Content-Type: [application/x-www-form-urlencoded]
224 User-Agent: [python-requests/2.18.4]
225 method: POST
226 uri: http://localhost:3000/api/v1/statuses
227 response:
228 body: {string: '{"id":"103704149316561035","created_at":"2020-02-22T19:28:59.341Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost/users/mastodonpy_test/statuses/103704149316561035","url":"http://localhost/@mastodonpy_test/103704149316561035","replies_count":0,"reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"content":"\u003cp\u003eToot
229 number 6!\u003c/p\u003e","reblog":null,"application":{"name":"Mastodon.py
230 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"bot":false,"discoverable":false,"group":false,"created_at":"2020-02-22T20:26:54.402Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost/@mastodonpy_test","avatar":"http://localhost/avatars/original/missing.png","avatar_static":"http://localhost/avatars/original/missing.png","header":"http://localhost/headers/original/missing.png","header_static":"http://localhost/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":8,"last_status_at":"2020-02-22","emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null}'}
231 headers:
232 Cache-Control: ['no-cache, no-store']
233 Content-Type: [application/json; charset=utf-8]
234 Referrer-Policy: [strict-origin-when-cross-origin]
235 Transfer-Encoding: [chunked]
236 Vary: ['Accept-Encoding, Origin']
237 X-Content-Type-Options: [nosniff]
238 X-Download-Options: [noopen]
239 X-Frame-Options: [SAMEORIGIN]
240 X-Permitted-Cross-Domain-Policies: [none]
241 X-Request-Id: [93854c13-4b4c-420e-a825-c65efae49785]
242 X-Runtime: ['0.251071']
243 X-XSS-Protection: [1; mode=block]
244 content-length: ['1329']
245 status: {code: 200, message: OK}
246 - request:
247 body: status=Toot+number+7%21
248 headers:
249 Accept: ['*/*']
250 Accept-Encoding: ['gzip, deflate']
251 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
252 Connection: [keep-alive]
253 Content-Length: ['23']
254 Content-Type: [application/x-www-form-urlencoded]
255 User-Agent: [python-requests/2.18.4]
256 method: POST
257 uri: http://localhost:3000/api/v1/statuses
258 response:
259 body: {string: '{"id":"103704149334172751","created_at":"2020-02-22T19:28:59.612Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost/users/mastodonpy_test/statuses/103704149334172751","url":"http://localhost/@mastodonpy_test/103704149334172751","replies_count":0,"reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"content":"\u003cp\u003eToot
260 number 7!\u003c/p\u003e","reblog":null,"application":{"name":"Mastodon.py
261 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"bot":false,"discoverable":false,"group":false,"created_at":"2020-02-22T20:26:54.402Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost/@mastodonpy_test","avatar":"http://localhost/avatars/original/missing.png","avatar_static":"http://localhost/avatars/original/missing.png","header":"http://localhost/headers/original/missing.png","header_static":"http://localhost/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2020-02-22","emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null}'}
262 headers:
263 Cache-Control: ['no-cache, no-store']
264 Content-Type: [application/json; charset=utf-8]
265 Referrer-Policy: [strict-origin-when-cross-origin]
266 Transfer-Encoding: [chunked]
267 Vary: ['Accept-Encoding, Origin']
268 X-Content-Type-Options: [nosniff]
269 X-Download-Options: [noopen]
270 X-Frame-Options: [SAMEORIGIN]
271 X-Permitted-Cross-Domain-Policies: [none]
272 X-Request-Id: [31c48d09-3509-4a99-ba24-5c08cc689296]
273 X-Runtime: ['0.203192']
274 X-XSS-Protection: [1; mode=block]
275 content-length: ['1329']
276 status: {code: 200, message: OK}
277 - request:
278 body: status=Toot+number+8%21
279 headers:
280 Accept: ['*/*']
281 Accept-Encoding: ['gzip, deflate']
282 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
283 Connection: [keep-alive]
284 Content-Length: ['23']
285 Content-Type: [application/x-www-form-urlencoded]
286 User-Agent: [python-requests/2.18.4]
287 method: POST
288 uri: http://localhost:3000/api/v1/statuses
289 response:
290 body: {string: '{"id":"103704149348344165","created_at":"2020-02-22T19:28:59.827Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost/users/mastodonpy_test/statuses/103704149348344165","url":"http://localhost/@mastodonpy_test/103704149348344165","replies_count":0,"reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"content":"\u003cp\u003eToot
291 number 8!\u003c/p\u003e","reblog":null,"application":{"name":"Mastodon.py
292 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"bot":false,"discoverable":false,"group":false,"created_at":"2020-02-22T20:26:54.402Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost/@mastodonpy_test","avatar":"http://localhost/avatars/original/missing.png","avatar_static":"http://localhost/avatars/original/missing.png","header":"http://localhost/headers/original/missing.png","header_static":"http://localhost/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":10,"last_status_at":"2020-02-22","emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null}'}
293 headers:
294 Cache-Control: ['no-cache, no-store']
295 Content-Type: [application/json; charset=utf-8]
296 Referrer-Policy: [strict-origin-when-cross-origin]
297 Transfer-Encoding: [chunked]
298 Vary: ['Accept-Encoding, Origin']
299 X-Content-Type-Options: [nosniff]
300 X-Download-Options: [noopen]
301 X-Frame-Options: [SAMEORIGIN]
302 X-Permitted-Cross-Domain-Policies: [none]
303 X-Request-Id: [24ce9bfd-9f86-4a6a-b889-998c58c137f2]
304 X-Runtime: ['0.223554']
305 X-XSS-Protection: [1; mode=block]
306 content-length: ['1330']
307 status: {code: 200, message: OK}
308 - request:
309 body: status=Toot+number+9%21
310 headers:
311 Accept: ['*/*']
312 Accept-Encoding: ['gzip, deflate']
313 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
314 Connection: [keep-alive]
315 Content-Length: ['23']
316 Content-Type: [application/x-www-form-urlencoded]
317 User-Agent: [python-requests/2.18.4]
318 method: POST
319 uri: http://localhost:3000/api/v1/statuses
320 response:
321 body: {string: '{"id":"103704149365440398","created_at":"2020-02-22T19:29:00.089Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost/users/mastodonpy_test/statuses/103704149365440398","url":"http://localhost/@mastodonpy_test/103704149365440398","replies_count":0,"reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"content":"\u003cp\u003eToot
322 number 9!\u003c/p\u003e","reblog":null,"application":{"name":"Mastodon.py
323 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"bot":false,"discoverable":false,"group":false,"created_at":"2020-02-22T20:26:54.402Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost/@mastodonpy_test","avatar":"http://localhost/avatars/original/missing.png","avatar_static":"http://localhost/avatars/original/missing.png","header":"http://localhost/headers/original/missing.png","header_static":"http://localhost/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":11,"last_status_at":"2020-02-22","emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null}'}
324 headers:
325 Cache-Control: ['no-cache, no-store']
326 Content-Type: [application/json; charset=utf-8]
327 Referrer-Policy: [strict-origin-when-cross-origin]
328 Transfer-Encoding: [chunked]
329 Vary: ['Accept-Encoding, Origin']
330 X-Content-Type-Options: [nosniff]
331 X-Download-Options: [noopen]
332 X-Frame-Options: [SAMEORIGIN]
333 X-Permitted-Cross-Domain-Policies: [none]
334 X-Request-Id: [98577765-f52d-4994-a792-36c9eef95f62]
335 X-Runtime: ['0.228954']
336 X-XSS-Protection: [1; mode=block]
337 content-length: ['1330']
338 status: {code: 200, message: OK}
339 - request:
340 body: null
341 headers:
342 Accept: ['*/*']
343 Accept-Encoding: ['gzip, deflate']
344 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
345 Connection: [keep-alive]
346 User-Agent: [python-requests/2.18.4]
347 method: GET
348 uri: http://localhost:3000/api/v1/accounts/1234567890123456/statuses?limit=5
349 response:
350 body: {string: '[{"id":"103704149365440398","created_at":"2020-02-22T19:29:00.089Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost/users/mastodonpy_test/statuses/103704149365440398","url":"http://localhost/@mastodonpy_test/103704149365440398","replies_count":0,"reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"content":"\u003cp\u003eToot
351 number 9!\u003c/p\u003e","reblog":null,"application":{"name":"Mastodon.py
352 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"bot":false,"discoverable":false,"group":false,"created_at":"2020-02-22T20:26:54.402Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost/@mastodonpy_test","avatar":"http://localhost/avatars/original/missing.png","avatar_static":"http://localhost/avatars/original/missing.png","header":"http://localhost/headers/original/missing.png","header_static":"http://localhost/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":11,"last_status_at":"2020-02-22","emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null},{"id":"103704149348344165","created_at":"2020-02-22T19:28:59.827Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost/users/mastodonpy_test/statuses/103704149348344165","url":"http://localhost/@mastodonpy_test/103704149348344165","replies_count":0,"reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"content":"\u003cp\u003eToot
353 number 8!\u003c/p\u003e","reblog":null,"application":{"name":"Mastodon.py
354 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"bot":false,"discoverable":false,"group":false,"created_at":"2020-02-22T20:26:54.402Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost/@mastodonpy_test","avatar":"http://localhost/avatars/original/missing.png","avatar_static":"http://localhost/avatars/original/missing.png","header":"http://localhost/headers/original/missing.png","header_static":"http://localhost/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":11,"last_status_at":"2020-02-22","emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null},{"id":"103704149334172751","created_at":"2020-02-22T19:28:59.612Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost/users/mastodonpy_test/statuses/103704149334172751","url":"http://localhost/@mastodonpy_test/103704149334172751","replies_count":0,"reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"content":"\u003cp\u003eToot
355 number 7!\u003c/p\u003e","reblog":null,"application":{"name":"Mastodon.py
356 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"bot":false,"discoverable":false,"group":false,"created_at":"2020-02-22T20:26:54.402Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost/@mastodonpy_test","avatar":"http://localhost/avatars/original/missing.png","avatar_static":"http://localhost/avatars/original/missing.png","header":"http://localhost/headers/original/missing.png","header_static":"http://localhost/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":11,"last_status_at":"2020-02-22","emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null},{"id":"103704149316561035","created_at":"2020-02-22T19:28:59.341Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost/users/mastodonpy_test/statuses/103704149316561035","url":"http://localhost/@mastodonpy_test/103704149316561035","replies_count":0,"reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"content":"\u003cp\u003eToot
357 number 6!\u003c/p\u003e","reblog":null,"application":{"name":"Mastodon.py
358 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"bot":false,"discoverable":false,"group":false,"created_at":"2020-02-22T20:26:54.402Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost/@mastodonpy_test","avatar":"http://localhost/avatars/original/missing.png","avatar_static":"http://localhost/avatars/original/missing.png","header":"http://localhost/headers/original/missing.png","header_static":"http://localhost/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":11,"last_status_at":"2020-02-22","emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null},{"id":"103704149300069225","created_at":"2020-02-22T19:28:59.095Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost/users/mastodonpy_test/statuses/103704149300069225","url":"http://localhost/@mastodonpy_test/103704149300069225","replies_count":0,"reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"content":"\u003cp\u003eToot
359 number 5!\u003c/p\u003e","reblog":null,"application":{"name":"Mastodon.py
360 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"bot":false,"discoverable":false,"group":false,"created_at":"2020-02-22T20:26:54.402Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost/@mastodonpy_test","avatar":"http://localhost/avatars/original/missing.png","avatar_static":"http://localhost/avatars/original/missing.png","header":"http://localhost/headers/original/missing.png","header_static":"http://localhost/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":11,"last_status_at":"2020-02-22","emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null}]'}
361 headers:
362 Cache-Control: ['no-cache, no-store']
363 Content-Type: [application/json; charset=utf-8]
364 Link: ['<http://localhost:3000/api/v1/accounts/1234567890123456/statuses?limit=5&max_id=103704149300069225>;
365 rel="next", <http://localhost:3000/api/v1/accounts/1234567890123456/statuses?limit=5&min_id=103704149365440398>;
366 rel="prev"']
367 Referrer-Policy: [strict-origin-when-cross-origin]
368 Transfer-Encoding: [chunked]
369 Vary: ['Accept-Encoding, Origin']
370 X-Content-Type-Options: [nosniff]
371 X-Download-Options: [noopen]
372 X-Frame-Options: [SAMEORIGIN]
373 X-Permitted-Cross-Domain-Policies: [none]
374 X-Request-Id: [4960311a-9e9a-4722-9417-5a34c30c805b]
375 X-Runtime: ['0.338488']
376 X-XSS-Protection: [1; mode=block]
377 content-length: ['6656']
378 status: {code: 200, message: OK}
379 - request:
380 body: null
381 headers:
382 Accept: ['*/*']
383 Accept-Encoding: ['gzip, deflate']
384 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
385 Connection: [keep-alive]
386 User-Agent: [python-requests/2.18.4]
387 method: GET
388 uri: http://localhost:3000/api/v1/accounts/1234567890123456/statuses?limit=5&max_id=103704149300069225
389 response:
390 body: {string: '[{"id":"103704149285153724","created_at":"2020-02-22T19:28:58.863Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost/users/mastodonpy_test/statuses/103704149285153724","url":"http://localhost/@mastodonpy_test/103704149285153724","replies_count":0,"reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"content":"\u003cp\u003eToot
391 number 4!\u003c/p\u003e","reblog":null,"application":{"name":"Mastodon.py
392 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"bot":false,"discoverable":false,"group":false,"created_at":"2020-02-22T20:26:54.402Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost/@mastodonpy_test","avatar":"http://localhost/avatars/original/missing.png","avatar_static":"http://localhost/avatars/original/missing.png","header":"http://localhost/headers/original/missing.png","header_static":"http://localhost/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":11,"last_status_at":"2020-02-22","emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null},{"id":"103704149270849591","created_at":"2020-02-22T19:28:58.643Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost/users/mastodonpy_test/statuses/103704149270849591","url":"http://localhost/@mastodonpy_test/103704149270849591","replies_count":0,"reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"content":"\u003cp\u003eToot
393 number 3!\u003c/p\u003e","reblog":null,"application":{"name":"Mastodon.py
394 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"bot":false,"discoverable":false,"group":false,"created_at":"2020-02-22T20:26:54.402Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost/@mastodonpy_test","avatar":"http://localhost/avatars/original/missing.png","avatar_static":"http://localhost/avatars/original/missing.png","header":"http://localhost/headers/original/missing.png","header_static":"http://localhost/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":11,"last_status_at":"2020-02-22","emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null},{"id":"103704149255716248","created_at":"2020-02-22T19:28:58.413Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost/users/mastodonpy_test/statuses/103704149255716248","url":"http://localhost/@mastodonpy_test/103704149255716248","replies_count":0,"reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"content":"\u003cp\u003eToot
395 number 2!\u003c/p\u003e","reblog":null,"application":{"name":"Mastodon.py
396 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"bot":false,"discoverable":false,"group":false,"created_at":"2020-02-22T20:26:54.402Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost/@mastodonpy_test","avatar":"http://localhost/avatars/original/missing.png","avatar_static":"http://localhost/avatars/original/missing.png","header":"http://localhost/headers/original/missing.png","header_static":"http://localhost/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":11,"last_status_at":"2020-02-22","emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null},{"id":"103704149240204204","created_at":"2020-02-22T19:28:58.181Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost/users/mastodonpy_test/statuses/103704149240204204","url":"http://localhost/@mastodonpy_test/103704149240204204","replies_count":0,"reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"content":"\u003cp\u003eToot
397 number 1!\u003c/p\u003e","reblog":null,"application":{"name":"Mastodon.py
398 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"bot":false,"discoverable":false,"group":false,"created_at":"2020-02-22T20:26:54.402Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost/@mastodonpy_test","avatar":"http://localhost/avatars/original/missing.png","avatar_static":"http://localhost/avatars/original/missing.png","header":"http://localhost/headers/original/missing.png","header_static":"http://localhost/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":11,"last_status_at":"2020-02-22","emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null},{"id":"103704149189751466","created_at":"2020-02-22T19:28:57.717Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost/users/mastodonpy_test/statuses/103704149189751466","url":"http://localhost/@mastodonpy_test/103704149189751466","replies_count":0,"reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"content":"\u003cp\u003eToot
399 number 0!\u003c/p\u003e","reblog":null,"application":{"name":"Mastodon.py
400 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"bot":false,"discoverable":false,"group":false,"created_at":"2020-02-22T20:26:54.402Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost/@mastodonpy_test","avatar":"http://localhost/avatars/original/missing.png","avatar_static":"http://localhost/avatars/original/missing.png","header":"http://localhost/headers/original/missing.png","header_static":"http://localhost/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":11,"last_status_at":"2020-02-22","emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null}]'}
401 headers:
402 Cache-Control: ['no-cache, no-store']
403 Content-Type: [application/json; charset=utf-8]
404 Link: ['<http://localhost:3000/api/v1/accounts/1234567890123456/statuses?limit=5&max_id=103704149189751466>;
405 rel="next", <http://localhost:3000/api/v1/accounts/1234567890123456/statuses?limit=5&min_id=103704149285153724>;
406 rel="prev"']
407 Referrer-Policy: [strict-origin-when-cross-origin]
408 Transfer-Encoding: [chunked]
409 Vary: ['Accept-Encoding, Origin']
410 X-Content-Type-Options: [nosniff]
411 X-Download-Options: [noopen]
412 X-Frame-Options: [SAMEORIGIN]
413 X-Permitted-Cross-Domain-Policies: [none]
414 X-Request-Id: [aa025632-b316-43c0-afc5-243f62d2b6b8]
415 X-Runtime: ['0.201975']
416 X-XSS-Protection: [1; mode=block]
417 content-length: ['6656']
418 status: {code: 200, message: OK}
419 - request:
420 body: null
421 headers:
422 Accept: ['*/*']
423 Accept-Encoding: ['gzip, deflate']
424 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
425 Connection: [keep-alive]
426 User-Agent: [python-requests/2.18.4]
427 method: GET
428 uri: http://localhost:3000/api/v1/accounts/1234567890123456/statuses?limit=5&min_id=103704149285153724
429 response:
430 body: {string: '[{"id":"103704149365440398","created_at":"2020-02-22T19:29:00.089Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost/users/mastodonpy_test/statuses/103704149365440398","url":"http://localhost/@mastodonpy_test/103704149365440398","replies_count":0,"reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"content":"\u003cp\u003eToot
431 number 9!\u003c/p\u003e","reblog":null,"application":{"name":"Mastodon.py
432 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"bot":false,"discoverable":false,"group":false,"created_at":"2020-02-22T20:26:54.402Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost/@mastodonpy_test","avatar":"http://localhost/avatars/original/missing.png","avatar_static":"http://localhost/avatars/original/missing.png","header":"http://localhost/headers/original/missing.png","header_static":"http://localhost/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":11,"last_status_at":"2020-02-22","emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null},{"id":"103704149348344165","created_at":"2020-02-22T19:28:59.827Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost/users/mastodonpy_test/statuses/103704149348344165","url":"http://localhost/@mastodonpy_test/103704149348344165","replies_count":0,"reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"content":"\u003cp\u003eToot
433 number 8!\u003c/p\u003e","reblog":null,"application":{"name":"Mastodon.py
434 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"bot":false,"discoverable":false,"group":false,"created_at":"2020-02-22T20:26:54.402Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost/@mastodonpy_test","avatar":"http://localhost/avatars/original/missing.png","avatar_static":"http://localhost/avatars/original/missing.png","header":"http://localhost/headers/original/missing.png","header_static":"http://localhost/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":11,"last_status_at":"2020-02-22","emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null},{"id":"103704149334172751","created_at":"2020-02-22T19:28:59.612Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost/users/mastodonpy_test/statuses/103704149334172751","url":"http://localhost/@mastodonpy_test/103704149334172751","replies_count":0,"reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"content":"\u003cp\u003eToot
435 number 7!\u003c/p\u003e","reblog":null,"application":{"name":"Mastodon.py
436 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"bot":false,"discoverable":false,"group":false,"created_at":"2020-02-22T20:26:54.402Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost/@mastodonpy_test","avatar":"http://localhost/avatars/original/missing.png","avatar_static":"http://localhost/avatars/original/missing.png","header":"http://localhost/headers/original/missing.png","header_static":"http://localhost/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":11,"last_status_at":"2020-02-22","emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null},{"id":"103704149316561035","created_at":"2020-02-22T19:28:59.341Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost/users/mastodonpy_test/statuses/103704149316561035","url":"http://localhost/@mastodonpy_test/103704149316561035","replies_count":0,"reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"content":"\u003cp\u003eToot
437 number 6!\u003c/p\u003e","reblog":null,"application":{"name":"Mastodon.py
438 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"bot":false,"discoverable":false,"group":false,"created_at":"2020-02-22T20:26:54.402Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost/@mastodonpy_test","avatar":"http://localhost/avatars/original/missing.png","avatar_static":"http://localhost/avatars/original/missing.png","header":"http://localhost/headers/original/missing.png","header_static":"http://localhost/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":11,"last_status_at":"2020-02-22","emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null},{"id":"103704149300069225","created_at":"2020-02-22T19:28:59.095Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost/users/mastodonpy_test/statuses/103704149300069225","url":"http://localhost/@mastodonpy_test/103704149300069225","replies_count":0,"reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"content":"\u003cp\u003eToot
439 number 5!\u003c/p\u003e","reblog":null,"application":{"name":"Mastodon.py
440 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"bot":false,"discoverable":false,"group":false,"created_at":"2020-02-22T20:26:54.402Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost/@mastodonpy_test","avatar":"http://localhost/avatars/original/missing.png","avatar_static":"http://localhost/avatars/original/missing.png","header":"http://localhost/headers/original/missing.png","header_static":"http://localhost/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":11,"last_status_at":"2020-02-22","emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null}]'}
441 headers:
442 Cache-Control: ['no-cache, no-store']
443 Content-Type: [application/json; charset=utf-8]
444 Link: ['<http://localhost:3000/api/v1/accounts/1234567890123456/statuses?limit=5&max_id=103704149300069225>;
445 rel="next", <http://localhost:3000/api/v1/accounts/1234567890123456/statuses?limit=5&min_id=103704149365440398>;
446 rel="prev"']
447 Referrer-Policy: [strict-origin-when-cross-origin]
448 Transfer-Encoding: [chunked]
449 Vary: ['Accept-Encoding, Origin']
450 X-Content-Type-Options: [nosniff]
451 X-Download-Options: [noopen]
452 X-Frame-Options: [SAMEORIGIN]
453 X-Permitted-Cross-Domain-Policies: [none]
454 X-Request-Id: [03a7b3a0-09b2-4281-833e-d5885806890e]
455 X-Runtime: ['0.169965']
456 X-XSS-Protection: [1; mode=block]
457 content-length: ['6656']
458 status: {code: 200, message: OK}
459 - request:
460 body: null
461 headers:
462 Accept: ['*/*']
463 Accept-Encoding: ['gzip, deflate']
464 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
465 Connection: [keep-alive]
466 Content-Length: ['0']
467 User-Agent: [python-requests/2.18.4]
468 method: DELETE
469 uri: http://localhost:3000/api/v1/statuses/103704149189751466
470 response:
471 body: {string: '{"id":"103704149189751466","created_at":"2020-02-22T19:28:57.717Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost/users/mastodonpy_test/statuses/103704149189751466","url":"http://localhost/@mastodonpy_test/103704149189751466","replies_count":0,"reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"text":"Toot
472 number 0!","reblog":null,"application":{"name":"Mastodon.py test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"bot":false,"discoverable":false,"group":false,"created_at":"2020-02-22T20:26:54.402Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost/@mastodonpy_test","avatar":"http://localhost/avatars/original/missing.png","avatar_static":"http://localhost/avatars/original/missing.png","header":"http://localhost/headers/original/missing.png","header_static":"http://localhost/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":11,"last_status_at":"2020-02-22","emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null}'}
473 headers:
474 Cache-Control: ['no-cache, no-store']
475 Content-Type: [application/json; charset=utf-8]
476 Referrer-Policy: [strict-origin-when-cross-origin]
477 Transfer-Encoding: [chunked]
478 Vary: ['Accept-Encoding, Origin']
479 X-Content-Type-Options: [nosniff]
480 X-Download-Options: [noopen]
481 X-Frame-Options: [SAMEORIGIN]
482 X-Permitted-Cross-Domain-Policies: [none]
483 X-Request-Id: [c9121201-0be7-4c73-bdce-884e21d969d4]
484 X-Runtime: ['0.157991']
485 X-XSS-Protection: [1; mode=block]
486 content-length: ['1300']
487 status: {code: 200, message: OK}
488 - request:
489 body: null
490 headers:
491 Accept: ['*/*']
492 Accept-Encoding: ['gzip, deflate']
493 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
494 Connection: [keep-alive]
495 Content-Length: ['0']
496 User-Agent: [python-requests/2.18.4]
497 method: DELETE
498 uri: http://localhost:3000/api/v1/statuses/103704149240204204
499 response:
500 body: {string: '{"id":"103704149240204204","created_at":"2020-02-22T19:28:58.181Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost/users/mastodonpy_test/statuses/103704149240204204","url":"http://localhost/@mastodonpy_test/103704149240204204","replies_count":0,"reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"text":"Toot
501 number 1!","reblog":null,"application":{"name":"Mastodon.py test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"bot":false,"discoverable":false,"group":false,"created_at":"2020-02-22T20:26:54.402Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost/@mastodonpy_test","avatar":"http://localhost/avatars/original/missing.png","avatar_static":"http://localhost/avatars/original/missing.png","header":"http://localhost/headers/original/missing.png","header_static":"http://localhost/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":10,"last_status_at":"2020-02-22","emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null}'}
502 headers:
503 Cache-Control: ['no-cache, no-store']
504 Content-Type: [application/json; charset=utf-8]
505 Referrer-Policy: [strict-origin-when-cross-origin]
506 Transfer-Encoding: [chunked]
507 Vary: ['Accept-Encoding, Origin']
508 X-Content-Type-Options: [nosniff]
509 X-Download-Options: [noopen]
510 X-Frame-Options: [SAMEORIGIN]
511 X-Permitted-Cross-Domain-Policies: [none]
512 X-Request-Id: [e2df2022-af35-41e7-ab48-c888b17fb266]
513 X-Runtime: ['0.205063']
514 X-XSS-Protection: [1; mode=block]
515 content-length: ['1300']
516 status: {code: 200, message: OK}
517 - request:
518 body: null
519 headers:
520 Accept: ['*/*']
521 Accept-Encoding: ['gzip, deflate']
522 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
523 Connection: [keep-alive]
524 Content-Length: ['0']
525 User-Agent: [python-requests/2.18.4]
526 method: DELETE
527 uri: http://localhost:3000/api/v1/statuses/103704149255716248
528 response:
529 body: {string: '{"id":"103704149255716248","created_at":"2020-02-22T19:28:58.413Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost/users/mastodonpy_test/statuses/103704149255716248","url":"http://localhost/@mastodonpy_test/103704149255716248","replies_count":0,"reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"text":"Toot
530 number 2!","reblog":null,"application":{"name":"Mastodon.py test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"bot":false,"discoverable":false,"group":false,"created_at":"2020-02-22T20:26:54.402Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost/@mastodonpy_test","avatar":"http://localhost/avatars/original/missing.png","avatar_static":"http://localhost/avatars/original/missing.png","header":"http://localhost/headers/original/missing.png","header_static":"http://localhost/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2020-02-22","emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null}'}
531 headers:
532 Cache-Control: ['no-cache, no-store']
533 Content-Type: [application/json; charset=utf-8]
534 Referrer-Policy: [strict-origin-when-cross-origin]
535 Transfer-Encoding: [chunked]
536 Vary: ['Accept-Encoding, Origin']
537 X-Content-Type-Options: [nosniff]
538 X-Download-Options: [noopen]
539 X-Frame-Options: [SAMEORIGIN]
540 X-Permitted-Cross-Domain-Policies: [none]
541 X-Request-Id: [cd3f1791-e612-445c-853a-d1b49229fdc7]
542 X-Runtime: ['0.173011']
543 X-XSS-Protection: [1; mode=block]
544 content-length: ['1299']
545 status: {code: 200, message: OK}
546 - request:
547 body: null
548 headers:
549 Accept: ['*/*']
550 Accept-Encoding: ['gzip, deflate']
551 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
552 Connection: [keep-alive]
553 Content-Length: ['0']
554 User-Agent: [python-requests/2.18.4]
555 method: DELETE
556 uri: http://localhost:3000/api/v1/statuses/103704149270849591
557 response:
558 body: {string: '{"id":"103704149270849591","created_at":"2020-02-22T19:28:58.643Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost/users/mastodonpy_test/statuses/103704149270849591","url":"http://localhost/@mastodonpy_test/103704149270849591","replies_count":0,"reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"text":"Toot
559 number 3!","reblog":null,"application":{"name":"Mastodon.py test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"bot":false,"discoverable":false,"group":false,"created_at":"2020-02-22T20:26:54.402Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost/@mastodonpy_test","avatar":"http://localhost/avatars/original/missing.png","avatar_static":"http://localhost/avatars/original/missing.png","header":"http://localhost/headers/original/missing.png","header_static":"http://localhost/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":8,"last_status_at":"2020-02-22","emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null}'}
560 headers:
561 Cache-Control: ['no-cache, no-store']
562 Content-Type: [application/json; charset=utf-8]
563 Referrer-Policy: [strict-origin-when-cross-origin]
564 Transfer-Encoding: [chunked]
565 Vary: ['Accept-Encoding, Origin']
566 X-Content-Type-Options: [nosniff]
567 X-Download-Options: [noopen]
568 X-Frame-Options: [SAMEORIGIN]
569 X-Permitted-Cross-Domain-Policies: [none]
570 X-Request-Id: [86e29869-c84c-4bda-ba30-cf3b7c047351]
571 X-Runtime: ['0.162408']
572 X-XSS-Protection: [1; mode=block]
573 content-length: ['1299']
574 status: {code: 200, message: OK}
575 - request:
576 body: null
577 headers:
578 Accept: ['*/*']
579 Accept-Encoding: ['gzip, deflate']
580 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
581 Connection: [keep-alive]
582 Content-Length: ['0']
583 User-Agent: [python-requests/2.18.4]
584 method: DELETE
585 uri: http://localhost:3000/api/v1/statuses/103704149285153724
586 response:
587 body: {string: '{"id":"103704149285153724","created_at":"2020-02-22T19:28:58.863Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost/users/mastodonpy_test/statuses/103704149285153724","url":"http://localhost/@mastodonpy_test/103704149285153724","replies_count":0,"reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"text":"Toot
588 number 4!","reblog":null,"application":{"name":"Mastodon.py test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"bot":false,"discoverable":false,"group":false,"created_at":"2020-02-22T20:26:54.402Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost/@mastodonpy_test","avatar":"http://localhost/avatars/original/missing.png","avatar_static":"http://localhost/avatars/original/missing.png","header":"http://localhost/headers/original/missing.png","header_static":"http://localhost/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":7,"last_status_at":"2020-02-22","emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null}'}
589 headers:
590 Cache-Control: ['no-cache, no-store']
591 Content-Type: [application/json; charset=utf-8]
592 Referrer-Policy: [strict-origin-when-cross-origin]
593 Transfer-Encoding: [chunked]
594 Vary: ['Accept-Encoding, Origin']
595 X-Content-Type-Options: [nosniff]
596 X-Download-Options: [noopen]
597 X-Frame-Options: [SAMEORIGIN]
598 X-Permitted-Cross-Domain-Policies: [none]
599 X-Request-Id: [4c6c6433-9a62-4b28-ad17-98c12279e9da]
600 X-Runtime: ['0.126905']
601 X-XSS-Protection: [1; mode=block]
602 content-length: ['1299']
603 status: {code: 200, message: OK}
604 - request:
605 body: null
606 headers:
607 Accept: ['*/*']
608 Accept-Encoding: ['gzip, deflate']
609 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
610 Connection: [keep-alive]
611 Content-Length: ['0']
612 User-Agent: [python-requests/2.18.4]
613 method: DELETE
614 uri: http://localhost:3000/api/v1/statuses/103704149300069225
615 response:
616 body: {string: '{"id":"103704149300069225","created_at":"2020-02-22T19:28:59.095Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost/users/mastodonpy_test/statuses/103704149300069225","url":"http://localhost/@mastodonpy_test/103704149300069225","replies_count":0,"reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"text":"Toot
617 number 5!","reblog":null,"application":{"name":"Mastodon.py test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"bot":false,"discoverable":false,"group":false,"created_at":"2020-02-22T20:26:54.402Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost/@mastodonpy_test","avatar":"http://localhost/avatars/original/missing.png","avatar_static":"http://localhost/avatars/original/missing.png","header":"http://localhost/headers/original/missing.png","header_static":"http://localhost/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":6,"last_status_at":"2020-02-22","emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null}'}
618 headers:
619 Cache-Control: ['no-cache, no-store']
620 Content-Type: [application/json; charset=utf-8]
621 Referrer-Policy: [strict-origin-when-cross-origin]
622 Transfer-Encoding: [chunked]
623 Vary: ['Accept-Encoding, Origin']
624 X-Content-Type-Options: [nosniff]
625 X-Download-Options: [noopen]
626 X-Frame-Options: [SAMEORIGIN]
627 X-Permitted-Cross-Domain-Policies: [none]
628 X-Request-Id: [a4a8ad1a-7b70-4322-b524-34c7a6966505]
629 X-Runtime: ['0.130927']
630 X-XSS-Protection: [1; mode=block]
631 content-length: ['1299']
632 status: {code: 200, message: OK}
633 - request:
634 body: null
635 headers:
636 Accept: ['*/*']
637 Accept-Encoding: ['gzip, deflate']
638 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
639 Connection: [keep-alive]
640 Content-Length: ['0']
641 User-Agent: [python-requests/2.18.4]
642 method: DELETE
643 uri: http://localhost:3000/api/v1/statuses/103704149316561035
644 response:
645 body: {string: '{"id":"103704149316561035","created_at":"2020-02-22T19:28:59.341Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost/users/mastodonpy_test/statuses/103704149316561035","url":"http://localhost/@mastodonpy_test/103704149316561035","replies_count":0,"reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"text":"Toot
646 number 6!","reblog":null,"application":{"name":"Mastodon.py test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"bot":false,"discoverable":false,"group":false,"created_at":"2020-02-22T20:26:54.402Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost/@mastodonpy_test","avatar":"http://localhost/avatars/original/missing.png","avatar_static":"http://localhost/avatars/original/missing.png","header":"http://localhost/headers/original/missing.png","header_static":"http://localhost/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":5,"last_status_at":"2020-02-22","emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null}'}
647 headers:
648 Cache-Control: ['no-cache, no-store']
649 Content-Type: [application/json; charset=utf-8]
650 Referrer-Policy: [strict-origin-when-cross-origin]
651 Transfer-Encoding: [chunked]
652 Vary: ['Accept-Encoding, Origin']
653 X-Content-Type-Options: [nosniff]
654 X-Download-Options: [noopen]
655 X-Frame-Options: [SAMEORIGIN]
656 X-Permitted-Cross-Domain-Policies: [none]
657 X-Request-Id: [2a19b9cb-7487-4c3f-9b5a-f8796526945b]
658 X-Runtime: ['0.137676']
659 X-XSS-Protection: [1; mode=block]
660 content-length: ['1299']
661 status: {code: 200, message: OK}
662 - request:
663 body: null
664 headers:
665 Accept: ['*/*']
666 Accept-Encoding: ['gzip, deflate']
667 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
668 Connection: [keep-alive]
669 Content-Length: ['0']
670 User-Agent: [python-requests/2.18.4]
671 method: DELETE
672 uri: http://localhost:3000/api/v1/statuses/103704149334172751
673 response:
674 body: {string: '{"id":"103704149334172751","created_at":"2020-02-22T19:28:59.612Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost/users/mastodonpy_test/statuses/103704149334172751","url":"http://localhost/@mastodonpy_test/103704149334172751","replies_count":0,"reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"text":"Toot
675 number 7!","reblog":null,"application":{"name":"Mastodon.py test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"bot":false,"discoverable":false,"group":false,"created_at":"2020-02-22T20:26:54.402Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost/@mastodonpy_test","avatar":"http://localhost/avatars/original/missing.png","avatar_static":"http://localhost/avatars/original/missing.png","header":"http://localhost/headers/original/missing.png","header_static":"http://localhost/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":4,"last_status_at":"2020-02-22","emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null}'}
676 headers:
677 Cache-Control: ['no-cache, no-store']
678 Content-Type: [application/json; charset=utf-8]
679 Referrer-Policy: [strict-origin-when-cross-origin]
680 Transfer-Encoding: [chunked]
681 Vary: ['Accept-Encoding, Origin']
682 X-Content-Type-Options: [nosniff]
683 X-Download-Options: [noopen]
684 X-Frame-Options: [SAMEORIGIN]
685 X-Permitted-Cross-Domain-Policies: [none]
686 X-Request-Id: [7a8d07ec-da26-4554-8011-46a70cf4c356]
687 X-Runtime: ['0.138911']
688 X-XSS-Protection: [1; mode=block]
689 content-length: ['1299']
690 status: {code: 200, message: OK}
691 - request:
692 body: null
693 headers:
694 Accept: ['*/*']
695 Accept-Encoding: ['gzip, deflate']
696 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
697 Connection: [keep-alive]
698 Content-Length: ['0']
699 User-Agent: [python-requests/2.18.4]
700 method: DELETE
701 uri: http://localhost:3000/api/v1/statuses/103704149348344165
702 response:
703 body: {string: '{"id":"103704149348344165","created_at":"2020-02-22T19:28:59.827Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost/users/mastodonpy_test/statuses/103704149348344165","url":"http://localhost/@mastodonpy_test/103704149348344165","replies_count":0,"reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"text":"Toot
704 number 8!","reblog":null,"application":{"name":"Mastodon.py test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"bot":false,"discoverable":false,"group":false,"created_at":"2020-02-22T20:26:54.402Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost/@mastodonpy_test","avatar":"http://localhost/avatars/original/missing.png","avatar_static":"http://localhost/avatars/original/missing.png","header":"http://localhost/headers/original/missing.png","header_static":"http://localhost/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":3,"last_status_at":"2020-02-22","emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null}'}
705 headers:
706 Cache-Control: ['no-cache, no-store']
707 Content-Type: [application/json; charset=utf-8]
708 Referrer-Policy: [strict-origin-when-cross-origin]
709 Transfer-Encoding: [chunked]
710 Vary: ['Accept-Encoding, Origin']
711 X-Content-Type-Options: [nosniff]
712 X-Download-Options: [noopen]
713 X-Frame-Options: [SAMEORIGIN]
714 X-Permitted-Cross-Domain-Policies: [none]
715 X-Request-Id: [4cdbde9e-b14a-405e-840e-d5ebac69f1a6]
716 X-Runtime: ['0.143361']
717 X-XSS-Protection: [1; mode=block]
718 content-length: ['1299']
719 status: {code: 200, message: OK}
720 - request:
721 body: null
722 headers:
723 Accept: ['*/*']
724 Accept-Encoding: ['gzip, deflate']
725 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
726 Connection: [keep-alive]
727 Content-Length: ['0']
728 User-Agent: [python-requests/2.18.4]
729 method: DELETE
730 uri: http://localhost:3000/api/v1/statuses/103704149365440398
731 response:
732 body: {string: '{"id":"103704149365440398","created_at":"2020-02-22T19:29:00.089Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost/users/mastodonpy_test/statuses/103704149365440398","url":"http://localhost/@mastodonpy_test/103704149365440398","replies_count":0,"reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"text":"Toot
733 number 9!","reblog":null,"application":{"name":"Mastodon.py test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"bot":false,"discoverable":false,"group":false,"created_at":"2020-02-22T20:26:54.402Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost/@mastodonpy_test","avatar":"http://localhost/avatars/original/missing.png","avatar_static":"http://localhost/avatars/original/missing.png","header":"http://localhost/headers/original/missing.png","header_static":"http://localhost/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":2,"last_status_at":"2020-02-22","emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null}'}
734 headers:
735 Cache-Control: ['no-cache, no-store']
736 Content-Type: [application/json; charset=utf-8]
737 Referrer-Policy: [strict-origin-when-cross-origin]
738 Transfer-Encoding: [chunked]
739 Vary: ['Accept-Encoding, Origin']
740 X-Content-Type-Options: [nosniff]
741 X-Download-Options: [noopen]
742 X-Frame-Options: [SAMEORIGIN]
743 X-Permitted-Cross-Domain-Policies: [none]
744 X-Request-Id: [41b9b30e-23fa-4929-a1a2-417ae0d28b48]
745 X-Runtime: ['0.130683']
746 X-XSS-Protection: [1; mode=block]
747 content-length: ['1299']
748 status: {code: 200, message: OK}
749version: 1
diff --git a/tests/test_pagination.py b/tests/test_pagination.py
index 72ac06e..9f26140 100644
--- a/tests/test_pagination.py
+++ b/tests/test_pagination.py
@@ -39,6 +39,17 @@ def test_fetch_next_previous_from_pagination_info(api):
39 account = api.account_verify_credentials() 39 account = api.account_verify_credentials()
40 with many_statuses(api): 40 with many_statuses(api):
41 statuses = api.account_statuses(account['id'], limit=5) 41 statuses = api.account_statuses(account['id'], limit=5)
42 next_statuses = api.fetch_next(statuses._pagination_next)
43 assert next_statuses
44 previous_statuses = api.fetch_previous(next_statuses._pagination_prev)
45 assert previous_statuses
46
47@pytest.mark.vcr()
48def test_fetch_next_previous_from_pagination_info_oldstyle(api):
49 # Old style compatibility mode. The storage in the list items is not anymore internally used.
50 account = api.account_verify_credentials()
51 with many_statuses(api):
52 statuses = api.account_statuses(account['id'], limit=5)
42 next_statuses = api.fetch_next(statuses[-1]._pagination_next) 53 next_statuses = api.fetch_next(statuses[-1]._pagination_next)
43 assert next_statuses 54 assert next_statuses
44 previous_statuses = api.fetch_previous(next_statuses[0]._pagination_prev) 55 previous_statuses = api.fetch_previous(next_statuses[0]._pagination_prev)
@@ -61,6 +72,17 @@ def test_fetch_next_previous_from_pagination_info_old_pagination(api):
61 72
62 with many_statuses(api): 73 with many_statuses(api):
63 statuses = api.account_statuses(account['id'], limit=5) 74 statuses = api.account_statuses(account['id'], limit=5)
75 next_statuses = api.fetch_next(statuses._pagination_next)
76 assert next_statuses
77 previous_statuses = api.fetch_previous(next_statuses._pagination_prev)
78 assert previous_statuses
79
80 # Old style compatibility mode. The storage in the list items is not anymore internally used.
81 with vcr.use_cassette('test_fetch_next_previous_from_pagination_info.yaml', cassette_library_dir='tests/cassettes_old_pagination', record_mode='none'):
82 account = api.account_verify_credentials()
83
84 with many_statuses(api):
85 statuses = api.account_statuses(account['id'], limit=5)
64 next_statuses = api.fetch_next(statuses[-1]._pagination_next) 86 next_statuses = api.fetch_next(statuses[-1]._pagination_next)
65 assert next_statuses 87 assert next_statuses
66 previous_statuses = api.fetch_previous(next_statuses[0]._pagination_prev) 88 previous_statuses = api.fetch_previous(next_statuses[0]._pagination_prev)
@@ -86,5 +108,9 @@ def test_link_headers(api):
86 }) 108 })
87 109
88 resp = api.timeline_hashtag(UNLIKELY_HASHTAG) 110 resp = api.timeline_hashtag(UNLIKELY_HASHTAG)
111 assert resp._pagination_next['max_id'] == _id
112 assert resp._pagination_prev['since_id'] == _id
113
114 # Old style compatibility mode. The storage in the list items is not anymore internally used.
89 assert resp[0]._pagination_next['max_id'] == _id 115 assert resp[0]._pagination_next['max_id'] == _id
90 assert resp[0]._pagination_prev['since_id'] == _id 116 assert resp[0]._pagination_prev['since_id'] == _id \ No newline at end of file
Powered by cgit v1.2.3 (git 2.41.0)