aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/index.rst14
-rw-r--r--mastodon/Mastodon.py102
-rw-r--r--mastodon/streaming.py50
-rw-r--r--tests/README.markdown2
-rw-r--r--tests/cassettes/test_bookmarks.yaml535
-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_bookmarks.py5
-rw-r--r--tests/test_pagination.py28
-rw-r--r--tests/test_streaming.py40
10 files changed, 1359 insertions, 173 deletions
diff --git a/docs/index.rst b/docs/index.rst
index 473777a..e7b1ed9 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -1275,6 +1275,19 @@ The streaming functions take instances of `StreamListener` as the `listener` par
1275A `CallbackStreamListener` class that allows you to specify function callbacks 1275A `CallbackStreamListener` class that allows you to specify function callbacks
1276directly is included for convenience. 1276directly is included for convenience.
1277 1277
1278For new well-known events implement the streaming function in `StreamListener` or `CallbackStreamListener`.
1279The function name is `on_` + the event name. If the event-name contains dots, use an underscore instead.
1280
1281E.g. for `'status.update'` the listener function should be named as `on_status_update`.
1282
1283It may be that future Mastodon versions will come with completely new (unknown) event names. In this
1284case a (deprecated) Mastodon.py would throw an error. If you want to avoid this in general, you can
1285override the listener function `on_unknown_event`. This has an additional parameter `name` which informs
1286about the name of the event. `unknown_event` contains the content of the event.
1287
1288Alternatively, a callback function can be passed in the `unknown_event_handler` parameter in the
1289`CallbackStreamListener` constructor.
1290
1278When in not-async mode or async mode without async_reconnect, the stream functions may raise 1291When in not-async mode or async mode without async_reconnect, the stream functions may raise
1279various exceptions: `MastodonMalformedEventError` if a received event cannot be parsed and 1292various exceptions: `MastodonMalformedEventError` if a received event cannot be parsed and
1280`MastodonNetworkError` if any connection problems occur. 1293`MastodonNetworkError` if any connection problems occur.
@@ -1294,6 +1307,7 @@ StreamListener
1294.. automethod:: StreamListener.on_notification 1307.. automethod:: StreamListener.on_notification
1295.. automethod:: StreamListener.on_delete 1308.. automethod:: StreamListener.on_delete
1296.. automethod:: StreamListener.on_conversation 1309.. automethod:: StreamListener.on_conversation
1310.. automethod:: StreamListener.on_unknown_event
1297.. automethod:: StreamListener.on_abort 1311.. automethod:: StreamListener.on_abort
1298.. automethod:: StreamListener.handle_heartbeat 1312.. automethod:: StreamListener.handle_heartbeat
1299 1313
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py
index ab9ac1f..3851fbf 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))
126 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
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
@@ -1636,13 +1653,23 @@ class Mastodon:
1636 # Reading data: Bookmarks 1653 # Reading data: Bookmarks
1637 ### 1654 ###
1638 @api_version("3.1.0", "3.1.0", __DICT_VERSION_STATUS) 1655 @api_version("3.1.0", "3.1.0", __DICT_VERSION_STATUS)
1639 def bookmarks(self): 1656 def bookmarks(self, max_id=None, min_id=None, since_id=None, limit=None):
1640 """ 1657 """
1641 Get a list of statuses bookmarked by the logged-in user. 1658 Get a list of statuses bookmarked by the logged-in user.
1642 1659
1643 Returns a list of `toot dicts`_. 1660 Returns a list of `toot dicts`_.
1644 """ 1661 """
1645 return self.__api_request('GET', '/api/v1/bookmarks') 1662 if max_id != None:
1663 max_id = self.__unpack_id(max_id)
1664
1665 if min_id != None:
1666 min_id = self.__unpack_id(min_id)
1667
1668 if since_id != None:
1669 since_id = self.__unpack_id(since_id)
1670
1671 params = self.__generate_params(locals())
1672 return self.__api_request('GET', '/api/v1/bookmarks', params)
1646 1673
1647 ### 1674 ###
1648 # Writing data: Statuses 1675 # Writing data: Statuses
@@ -3043,8 +3070,8 @@ class Mastodon:
3043 Returns the next page or None if no further data is available. 3070 Returns the next page or None if no further data is available.
3044 """ 3071 """
3045 if isinstance(previous_page, list) and len(previous_page) != 0: 3072 if isinstance(previous_page, list) and len(previous_page) != 0:
3046 if hasattr(previous_page[-1], '_pagination_next'): 3073 if hasattr(previous_page, '_pagination_next'):
3047 params = copy.deepcopy(previous_page[-1]._pagination_next) 3074 params = copy.deepcopy(previous_page._pagination_next)
3048 else: 3075 else:
3049 return None 3076 return None
3050 else: 3077 else:
@@ -3067,8 +3094,8 @@ class Mastodon:
3067 Returns the previous page or None if no further data is available. 3094 Returns the previous page or None if no further data is available.
3068 """ 3095 """
3069 if isinstance(next_page, list) and len(next_page) != 0: 3096 if isinstance(next_page, list) and len(next_page) != 0:
3070 if hasattr(next_page[0], '_pagination_prev'): 3097 if hasattr(next_page, '_pagination_prev'):
3071 params = copy.deepcopy(next_page[0]._pagination_prev) 3098 params = copy.deepcopy(next_page._pagination_prev)
3072 else: 3099 else:
3073 return None 3100 return None
3074 else: 3101 else:
@@ -3233,7 +3260,7 @@ class Mastodon:
3233 if (key in json_object and isinstance(json_object[key], six.text_type)): 3260 if (key in json_object and isinstance(json_object[key], six.text_type)):
3234 if json_object[key].lower() == 'true': 3261 if json_object[key].lower() == 'true':
3235 json_object[key] = True 3262 json_object[key] = True
3236 if json_object[key].lower() == 'False': 3263 if json_object[key].lower() == 'false':
3237 json_object[key] = False 3264 json_object[key] = False
3238 return json_object 3265 return json_object
3239 3266
@@ -3446,6 +3473,7 @@ class Mastodon:
3446 if isinstance(response, list) and \ 3473 if isinstance(response, list) and \
3447 'Link' in response_object.headers and \ 3474 'Link' in response_object.headers and \
3448 response_object.headers['Link'] != "": 3475 response_object.headers['Link'] != "":
3476 response = AttribAccessList(response)
3449 tmp_urls = requests.utils.parse_header_links( 3477 tmp_urls = requests.utils.parse_header_links(
3450 response_object.headers['Link'].rstrip('>').replace('>,<', ',<')) 3478 response_object.headers['Link'].rstrip('>').replace('>,<', ',<'))
3451 for url in tmp_urls: 3479 for url in tmp_urls:
@@ -3470,7 +3498,12 @@ class Mastodon:
3470 del next_params['since_id'] 3498 del next_params['since_id']
3471 if "min_id" in next_params: 3499 if "min_id" in next_params:
3472 del next_params['min_id'] 3500 del next_params['min_id']
3473 response[-1]._pagination_next = next_params 3501 response._pagination_next = next_params
3502
3503 # Maybe other API users rely on the pagination info in the last item
3504 # Will be removed in future
3505 if isinstance(response[-1], AttribAccessDict):
3506 response[-1]._pagination_next = next_params
3474 3507
3475 if url['rel'] == 'prev': 3508 if url['rel'] == 'prev':
3476 # Be paranoid and extract since_id or min_id specifically 3509 # Be paranoid and extract since_id or min_id specifically
@@ -3489,8 +3522,13 @@ class Mastodon:
3489 prev_params['since_id'] = since_id 3522 prev_params['since_id'] = since_id
3490 if "max_id" in prev_params: 3523 if "max_id" in prev_params:
3491 del prev_params['max_id'] 3524 del prev_params['max_id']
3492 response[0]._pagination_prev = prev_params 3525 response._pagination_prev = prev_params
3493 3526
3527 # Maybe other API users rely on the pagination info in the first item
3528 # Will be removed in future
3529 if isinstance(response[0], AttribAccessDict):
3530 response[0]._pagination_prev = prev_params
3531
3494 # New and fantastico (post-2.6.0): min_id pagination 3532 # New and fantastico (post-2.6.0): min_id pagination
3495 matchgroups = re.search(r"[?&]min_id=([^&]+)", prev_url) 3533 matchgroups = re.search(r"[?&]min_id=([^&]+)", prev_url)
3496 if matchgroups: 3534 if matchgroups:
@@ -3504,7 +3542,12 @@ class Mastodon:
3504 prev_params['min_id'] = min_id 3542 prev_params['min_id'] = min_id
3505 if "max_id" in prev_params: 3543 if "max_id" in prev_params:
3506 del prev_params['max_id'] 3544 del prev_params['max_id']
3507 response[0]._pagination_prev = prev_params 3545 response._pagination_prev = prev_params
3546
3547 # Maybe other API users rely on the pagination info in the first item
3548 # Will be removed in future
3549 if isinstance(response[0], AttribAccessDict):
3550 response[0]._pagination_prev = prev_params
3508 3551
3509 return response 3552 return response
3510 3553
@@ -3570,7 +3613,8 @@ class Mastodon:
3570 3613
3571 def close(self): 3614 def close(self):
3572 self.closed = True 3615 self.closed = True
3573 self.connection.close() 3616 if not self.connection is None:
3617 self.connection.close()
3574 3618
3575 def is_alive(self): 3619 def is_alive(self):
3576 return self._thread.is_alive() 3620 return self._thread.is_alive()
@@ -3581,6 +3625,14 @@ class Mastodon:
3581 else: 3625 else:
3582 return True 3626 return True
3583 3627
3628 def _sleep_attentive(self):
3629 if self._thread != threading.current_thread():
3630 raise RuntimeError ("Illegal call from outside the stream_handle thread")
3631 time_remaining = self.reconnect_async_wait_sec
3632 while time_remaining>0 and not self.closed:
3633 time.sleep(0.5)
3634 time_remaining -= 0.5
3635
3584 def _threadproc(self): 3636 def _threadproc(self):
3585 self._thread = threading.current_thread() 3637 self._thread = threading.current_thread()
3586 3638
@@ -3602,16 +3654,26 @@ class Mastodon:
3602 self.reconnecting = True 3654 self.reconnecting = True
3603 connect_success = False 3655 connect_success = False
3604 while not connect_success: 3656 while not connect_success:
3605 connect_success = True 3657 if self.closed:
3658 # Someone from outside stopped the streaming
3659 self.running = False
3660 break
3606 try: 3661 try:
3607 self.connection = self.connect_func() 3662 the_connection = self.connect_func()
3608 if self.connection.status_code != 200: 3663 if the_connection.status_code != 200:
3609 time.sleep(self.reconnect_async_wait_sec) 3664 exception = MastodonNetworkError(f"Could not connect to server. "
3610 connect_success = False 3665 f"HTTP status: {the_connection.status_code}")
3611 exception = MastodonNetworkError("Could not connect to server.")
3612 listener.on_abort(exception) 3666 listener.on_abort(exception)
3667 self._sleep_attentive()
3668 if self.closed:
3669 # Here we have maybe a rare race condition. Exactly on connect, someone
3670 # stopped the streaming before. We close the previous established connection:
3671 the_connection.close()
3672 else:
3673 self.connection = the_connection
3674 connect_success = True
3613 except: 3675 except:
3614 time.sleep(self.reconnect_async_wait_sec) 3676 self._sleep_attentive()
3615 connect_success = False 3677 connect_success = False
3616 self.reconnecting = False 3678 self.reconnecting = False
3617 else: 3679 else:
diff --git a/mastodon/streaming.py b/mastodon/streaming.py
index 214ed1c..ceb61ea 100644
--- a/mastodon/streaming.py
+++ b/mastodon/streaming.py
@@ -45,6 +45,16 @@ class StreamListener(object):
45 contains the resulting conversation dict.""" 45 contains the resulting conversation dict."""
46 pass 46 pass
47 47
48 def on_unknown_event(self, name, unknown_event = None):
49 """An unknown mastodon API event has been received. The name contains the event-name and unknown_event
50 contains the content of the unknown event.
51
52 This function must be implemented, if unknown events should be handled without an error.
53 """
54 exception = MastodonMalformedEventError('Bad event type', name)
55 self.on_abort(exception)
56 raise exception
57
48 def handle_heartbeat(self): 58 def handle_heartbeat(self):
49 """The server has sent us a keep-alive message. This callback may be 59 """The server has sent us a keep-alive message. This callback may be
50 useful to carry out periodic housekeeping tasks, or just to confirm 60 useful to carry out periodic housekeeping tasks, or just to confirm
@@ -56,6 +66,11 @@ class StreamListener(object):
56 Handles a stream of events from the Mastodon server. When each event 66 Handles a stream of events from the Mastodon server. When each event
57 is received, the corresponding .on_[name]() method is called. 67 is received, the corresponding .on_[name]() method is called.
58 68
69 When the Mastodon API changes, the on_unknown_event(name, content)
70 function is called.
71 The default behavior is to throw an error. Define a callback handler
72 to intercept unknown events if needed (and avoid errors)
73
59 response; a requests response object with the open stream for reading. 74 response; a requests response object with the open stream for reading.
60 """ 75 """
61 event = {} 76 event = {}
@@ -137,33 +152,32 @@ class StreamListener(object):
137 exception, 152 exception,
138 err 153 err
139 ) 154 )
140 155 # New mastodon API also supports event names with dots:
141 handler_name = 'on_' + name 156 handler_name = 'on_' + name.replace('.', '_')
142 try: 157 # A generic way to handle unknown events to make legacy code more stable for future changes
143 handler = getattr(self, handler_name) 158 handler = getattr(self, handler_name, self.on_unknown_event)
144 except AttributeError as err: 159 if handler != self.on_unknown_event:
145 exception = MastodonMalformedEventError('Bad event type', name)
146 self.on_abort(exception)
147 six.raise_from(
148 exception,
149 err
150 )
151 else:
152 handler(payload) 160 handler(payload)
161 else:
162 handler(name, payload)
163
153 164
154class CallbackStreamListener(StreamListener): 165class CallbackStreamListener(StreamListener):
155 """ 166 """
156 Simple callback stream handler class. 167 Simple callback stream handler class.
157 Can optionally additionally send local update events to a separate handler. 168 Can optionally additionally send local update events to a separate handler.
169 Define an unknown_event_handler for new Mastodon API events. If not, the
170 listener will raise an error on new, not handled, events from the API.
158 """ 171 """
159 def __init__(self, update_handler = None, local_update_handler = None, delete_handler = None, notification_handler = None, conversation_handler = None): 172 def __init__(self, update_handler = None, local_update_handler = None, delete_handler = None, notification_handler = None, conversation_handler = None, unknown_event_handler = None):
160 super(CallbackStreamListener, self).__init__() 173 super(CallbackStreamListener, self).__init__()
161 self.update_handler = update_handler 174 self.update_handler = update_handler
162 self.local_update_handler = local_update_handler 175 self.local_update_handler = local_update_handler
163 self.delete_handler = delete_handler 176 self.delete_handler = delete_handler
164 self.notification_handler = notification_handler 177 self.notification_handler = notification_handler
165 self.conversation_handler = conversation_handler 178 self.conversation_handler = conversation_handler
166 179 self.unknown_event_handler = unknown_event_handler
180
167 def on_update(self, status): 181 def on_update(self, status):
168 if self.update_handler != None: 182 if self.update_handler != None:
169 self.update_handler(status) 183 self.update_handler(status)
@@ -188,3 +202,11 @@ class CallbackStreamListener(StreamListener):
188 def on_conversation(self, conversation): 202 def on_conversation(self, conversation):
189 if self.conversation_handler != None: 203 if self.conversation_handler != None:
190 self.conversation_handler(conversation) 204 self.conversation_handler(conversation)
205
206 def on_unknown_event(self, name, unknown_event = None):
207 if self.unknown_event_handler != None:
208 self.unknown_event_handler(name, unknown_event)
209 else:
210 exception = MastodonMalformedEventError('Bad event type', name)
211 self.on_abort(exception)
212 raise exception
diff --git a/tests/README.markdown b/tests/README.markdown
index 368f4f5..62b5e10 100644
--- a/tests/README.markdown
+++ b/tests/README.markdown
@@ -26,7 +26,7 @@ This test suite uses [VCR.py][] to record requests to Mastodon and replay them i
26If you want to add or change tests, you will need a Mastodon development server running on `http://localhost:3000`, with the default `admin` user and default password. 26If you want to add or change tests, you will need a Mastodon development server running on `http://localhost:3000`, with the default `admin` user and default password.
27To set this up, follow the development guide and set up the database using "rails db:setup". 27To set this up, follow the development guide and set up the database using "rails db:setup".
28 28
29It also needs a test OAuth app and an additional test user to be set up by applying the provided `setup.sql` to Mastodon's database: 29It also needs a test OAuth app-registriation and an additional test user to be set up by applying the provided `setup.sql` to Mastodon's database:
30 30
31 psql -d mastodon_development < tests/setup.sql 31 psql -d mastodon_development < tests/setup.sql
32 32
diff --git a/tests/cassettes/test_bookmarks.yaml b/tests/cassettes/test_bookmarks.yaml
index c2bee19..de9c314 100644
--- a/tests/cassettes/test_bookmarks.yaml
+++ b/tests/cassettes/test_bookmarks.yaml
@@ -2,174 +2,441 @@ interactions:
2- request: 2- request:
3 body: status=Toot%21 3 body: status=Toot%21
4 headers: 4 headers:
5 Accept: ['*/*'] 5 Accept:
6 Accept-Encoding: ['gzip, deflate'] 6 - '*/*'
7 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN] 7 Accept-Encoding:
8 Connection: [keep-alive] 8 - gzip, deflate
9 Content-Length: ['14'] 9 Authorization:
10 Content-Type: [application/x-www-form-urlencoded] 10 - Bearer __MASTODON_PY_TEST_ACCESS_TOKEN
11 User-Agent: [python-requests/2.18.4] 11 Connection:
12 - keep-alive
13 Content-Length:
14 - '14'
15 Content-Type:
16 - application/x-www-form-urlencoded
17 User-Agent:
18 - python-requests/2.22.0
12 method: POST 19 method: POST
13 uri: http://localhost:3000/api/v1/statuses 20 uri: http://localhost:3000/api/v1/statuses
14 response: 21 response:
15 body: {string: '{"id":"103704183225122470","created_at":"2020-02-22T19:37:36.738Z","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/103704183225122470","url":"http://localhost/@mastodonpy_test/103704183225122470","replies_count":0,"reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"content":"\u003cp\u003eToot!\u003c/p\u003e","reblog":null,"application":{"name":"Mastodon.py 22 body:
16 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}'} 23 string: '{"id":"108532515807337403","created_at":"2022-06-24T12:46:05.129Z","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/108532515807337403","url":"http://localhost/@mastodonpy_test/108532515807337403","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"content":"\u003cp\u003eToot!\u003c/p\u003e","reblog":null,"application":{"name":"Mastodon.py
24 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":true,"bot":false,"discoverable":null,"group":false,"created_at":"2022-06-24T00:00:00.000Z","note":"","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":"2022-06-24","emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null}'
17 headers: 25 headers:
18 Cache-Control: ['no-cache, no-store'] 26 Cache-Control:
19 Content-Type: [application/json; charset=utf-8] 27 - no-store
20 Referrer-Policy: [strict-origin-when-cross-origin] 28 Content-Security-Policy:
21 Transfer-Encoding: [chunked] 29 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src
22 Vary: ['Accept-Encoding, Origin'] 30 ''self'' http://localhost; img-src ''self'' https: data: blob: http://localhost;
23 X-Content-Type-Options: [nosniff] 31 style-src ''self'' http://localhost ''nonce-s4DtHaGKm+Sv7S0opGjkuA==''; media-src
24 X-Download-Options: [noopen] 32 ''self'' https: data: http://localhost; frame-src ''self'' https:; manifest-src
25 X-Frame-Options: [SAMEORIGIN] 33 ''self'' http://localhost; connect-src ''self'' data: blob: http://localhost
26 X-Permitted-Cross-Domain-Policies: [none] 34 http://files.example.com ws://localhost:4000 ws://localhost:3035 http://localhost:3035;
27 X-Request-Id: [4c259279-4810-4065-bda7-44fdd2e5e769] 35 script-src ''self'' ''unsafe-inline'' ''unsafe-eval'' http://localhost; child-src
28 X-Runtime: ['0.160125'] 36 ''self'' blob: http://localhost; worker-src ''self'' blob: http://localhost'
29 X-XSS-Protection: [1; mode=block] 37 Content-Type:
30 content-length: ['1320'] 38 - application/json; charset=utf-8
31 status: {code: 200, message: OK} 39 ETag:
40 - W/"16c19c98c5667003bada6cc08d6a9efd"
41 Referrer-Policy:
42 - strict-origin-when-cross-origin
43 Transfer-Encoding:
44 - chunked
45 Vary:
46 - Accept, Accept-Encoding, Origin
47 X-Content-Type-Options:
48 - nosniff
49 X-Download-Options:
50 - noopen
51 X-Frame-Options:
52 - SAMEORIGIN
53 X-Permitted-Cross-Domain-Policies:
54 - none
55 X-RateLimit-Limit:
56 - '300'
57 X-RateLimit-Remaining:
58 - '290'
59 X-RateLimit-Reset:
60 - '2022-06-24T15:00:00.156190Z'
61 X-Request-Id:
62 - a38516b7-de3e-4c49-9405-0bded1f29145
63 X-Runtime:
64 - '0.047610'
65 X-XSS-Protection:
66 - 1; mode=block
67 content-length:
68 - '1308'
69 status:
70 code: 200
71 message: OK
32- request: 72- request:
33 body: null 73 body: null
34 headers: 74 headers:
35 Accept: ['*/*'] 75 Accept:
36 Accept-Encoding: ['gzip, deflate'] 76 - '*/*'
37 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN] 77 Accept-Encoding:
38 Connection: [keep-alive] 78 - gzip, deflate
39 Content-Length: ['0'] 79 Authorization:
40 User-Agent: [python-requests/2.18.4] 80 - Bearer __MASTODON_PY_TEST_ACCESS_TOKEN
81 Connection:
82 - keep-alive
83 Content-Length:
84 - '0'
85 User-Agent:
86 - python-requests/2.22.0
41 method: POST 87 method: POST
42 uri: http://localhost:3000/api/v1/statuses/103704183225122470/bookmark 88 uri: http://localhost:3000/api/v1/statuses/108532515807337403/bookmark
43 response: 89 response:
44 body: {string: '{"id":"103704183225122470","created_at":"2020-02-22T19:37:36.738Z","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/103704183225122470","url":"http://localhost/@mastodonpy_test/103704183225122470","replies_count":0,"reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"bookmarked":true,"pinned":false,"content":"\u003cp\u003eToot!\u003c/p\u003e","reblog":null,"application":{"name":"Mastodon.py 90 body:
45 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}'} 91 string: '{"id":"108532515807337403","created_at":"2022-06-24T12:46:05.129Z","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/108532515807337403","url":"http://localhost/@mastodonpy_test/108532515807337403","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":true,"pinned":false,"content":"\u003cp\u003eToot!\u003c/p\u003e","reblog":null,"application":{"name":"Mastodon.py
92 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":true,"bot":false,"discoverable":null,"group":false,"created_at":"2022-06-24T00:00:00.000Z","note":"","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":"2022-06-24","emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null}'
46 headers: 93 headers:
47 Cache-Control: ['no-cache, no-store'] 94 Cache-Control:
48 Content-Type: [application/json; charset=utf-8] 95 - no-store
49 Referrer-Policy: [strict-origin-when-cross-origin] 96 Content-Security-Policy:
50 Transfer-Encoding: [chunked] 97 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src
51 Vary: ['Accept-Encoding, Origin'] 98 ''self'' http://localhost; img-src ''self'' https: data: blob: http://localhost;
52 X-Content-Type-Options: [nosniff] 99 style-src ''self'' http://localhost ''nonce-r/DodIkic+v9H9lAcksQVw==''; media-src
53 X-Download-Options: [noopen] 100 ''self'' https: data: http://localhost; frame-src ''self'' https:; manifest-src
54 X-Frame-Options: [SAMEORIGIN] 101 ''self'' http://localhost; connect-src ''self'' data: blob: http://localhost
55 X-Permitted-Cross-Domain-Policies: [none] 102 http://files.example.com ws://localhost:4000 ws://localhost:3035 http://localhost:3035;
56 X-Request-Id: [a0ef24c0-bc8d-45ef-80af-0737f40f4191] 103 script-src ''self'' ''unsafe-inline'' ''unsafe-eval'' http://localhost; child-src
57 X-Runtime: ['0.157864'] 104 ''self'' blob: http://localhost; worker-src ''self'' blob: http://localhost'
58 X-XSS-Protection: [1; mode=block] 105 Content-Type:
59 content-length: ['1319'] 106 - application/json; charset=utf-8
60 status: {code: 200, message: OK} 107 ETag:
108 - W/"bb1e121980e105d13ea65b61a8fe3f9e"
109 Referrer-Policy:
110 - strict-origin-when-cross-origin
111 Transfer-Encoding:
112 - chunked
113 Vary:
114 - Accept, Accept-Encoding, Origin
115 X-Content-Type-Options:
116 - nosniff
117 X-Download-Options:
118 - noopen
119 X-Frame-Options:
120 - SAMEORIGIN
121 X-Permitted-Cross-Domain-Policies:
122 - none
123 X-Request-Id:
124 - 4af13637-38f4-41d6-ad47-756de2626bf3
125 X-Runtime:
126 - '0.041993'
127 X-XSS-Protection:
128 - 1; mode=block
129 content-length:
130 - '1307'
131 status:
132 code: 200
133 message: OK
61- request: 134- request:
62 body: null 135 body: null
63 headers: 136 headers:
64 Accept: ['*/*'] 137 Accept:
65 Accept-Encoding: ['gzip, deflate'] 138 - '*/*'
66 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN] 139 Accept-Encoding:
67 Connection: [keep-alive] 140 - gzip, deflate
68 User-Agent: [python-requests/2.18.4] 141 Authorization:
142 - Bearer __MASTODON_PY_TEST_ACCESS_TOKEN
143 Connection:
144 - keep-alive
145 User-Agent:
146 - python-requests/2.22.0
69 method: GET 147 method: GET
70 uri: http://localhost:3000/api/v1/bookmarks 148 uri: http://localhost:3000/api/v1/bookmarks
71 response: 149 response:
72 body: {string: '[{"id":"103704183225122470","created_at":"2020-02-22T19:37:36.738Z","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/103704183225122470","url":"http://localhost/@mastodonpy_test/103704183225122470","replies_count":0,"reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"bookmarked":true,"pinned":false,"content":"\u003cp\u003eToot!\u003c/p\u003e","reblog":null,"application":{"name":"Mastodon.py 150 body:
73 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}]'} 151 string: '[{"id":"108532515807337403","created_at":"2022-06-24T12:46:05.129Z","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/108532515807337403","url":"http://localhost/@mastodonpy_test/108532515807337403","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":true,"pinned":false,"content":"\u003cp\u003eToot!\u003c/p\u003e","reblog":null,"application":{"name":"Mastodon.py
152 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":true,"bot":false,"discoverable":null,"group":false,"created_at":"2022-06-24T00:00:00.000Z","note":"","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":"2022-06-24","emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null}]'
74 headers: 153 headers:
75 Cache-Control: ['no-cache, no-store'] 154 Cache-Control:
76 Content-Type: [application/json; charset=utf-8] 155 - no-store
77 Link: ['<http://localhost:3000/api/v1/bookmarks?min_id=2>; rel="prev"'] 156 Content-Security-Policy:
78 Referrer-Policy: [strict-origin-when-cross-origin] 157 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src
79 Transfer-Encoding: [chunked] 158 ''self'' http://localhost; img-src ''self'' https: data: blob: http://localhost;
80 Vary: ['Accept-Encoding, Origin'] 159 style-src ''self'' http://localhost ''nonce-EEFQZtT2hj45UYMa5FifxA==''; media-src
81 X-Content-Type-Options: [nosniff] 160 ''self'' https: data: http://localhost; frame-src ''self'' https:; manifest-src
82 X-Download-Options: [noopen] 161 ''self'' http://localhost; connect-src ''self'' data: blob: http://localhost
83 X-Frame-Options: [SAMEORIGIN] 162 http://files.example.com ws://localhost:4000 ws://localhost:3035 http://localhost:3035;
84 X-Permitted-Cross-Domain-Policies: [none] 163 script-src ''self'' ''unsafe-inline'' ''unsafe-eval'' http://localhost; child-src
85 X-Request-Id: [e6548f1e-3d17-46be-aca7-f310783119a8] 164 ''self'' blob: http://localhost; worker-src ''self'' blob: http://localhost'
86 X-Runtime: ['0.075518'] 165 Content-Type:
87 X-XSS-Protection: [1; mode=block] 166 - application/json; charset=utf-8
88 content-length: ['1321'] 167 ETag:
89 status: {code: 200, message: OK} 168 - W/"e28cea671d77758e8cd2652347a030d1"
169 Link:
170 - <http://localhost:3000/api/v1/bookmarks?min_id=11>; rel="prev"
171 Referrer-Policy:
172 - strict-origin-when-cross-origin
173 Transfer-Encoding:
174 - chunked
175 Vary:
176 - Accept, Accept-Encoding, Origin
177 X-Content-Type-Options:
178 - nosniff
179 X-Download-Options:
180 - noopen
181 X-Frame-Options:
182 - SAMEORIGIN
183 X-Permitted-Cross-Domain-Policies:
184 - none
185 X-Request-Id:
186 - 0fe7aaf8-add4-4523-a98f-22608f714cad
187 X-Runtime:
188 - '0.036771'
189 X-XSS-Protection:
190 - 1; mode=block
191 content-length:
192 - '1309'
193 status:
194 code: 200
195 message: OK
90- request: 196- request:
91 body: null 197 body: null
92 headers: 198 headers:
93 Accept: ['*/*'] 199 Accept:
94 Accept-Encoding: ['gzip, deflate'] 200 - '*/*'
95 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN] 201 Accept-Encoding:
96 Connection: [keep-alive] 202 - gzip, deflate
97 Content-Length: ['0'] 203 Authorization:
98 User-Agent: [python-requests/2.18.4] 204 - Bearer __MASTODON_PY_TEST_ACCESS_TOKEN
205 Connection:
206 - keep-alive
207 User-Agent:
208 - python-requests/2.22.0
209 method: GET
210 uri: http://localhost:3000/api/v1/bookmarks?limit=1
211 response:
212 body:
213 string: '[{"id":"108532515807337403","created_at":"2022-06-24T12:46:05.129Z","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/108532515807337403","url":"http://localhost/@mastodonpy_test/108532515807337403","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":true,"pinned":false,"content":"\u003cp\u003eToot!\u003c/p\u003e","reblog":null,"application":{"name":"Mastodon.py
214 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":true,"bot":false,"discoverable":null,"group":false,"created_at":"2022-06-24T00:00:00.000Z","note":"","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":"2022-06-24","emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null}]'
215 headers:
216 Cache-Control:
217 - no-store
218 Content-Security-Policy:
219 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src
220 ''self'' http://localhost; img-src ''self'' https: data: blob: http://localhost;
221 style-src ''self'' http://localhost ''nonce-wzGUumpjXwVRz6YQjB+AhQ==''; media-src
222 ''self'' https: data: http://localhost; frame-src ''self'' https:; manifest-src
223 ''self'' http://localhost; connect-src ''self'' data: blob: http://localhost
224 http://files.example.com ws://localhost:4000 ws://localhost:3035 http://localhost:3035;
225 script-src ''self'' ''unsafe-inline'' ''unsafe-eval'' http://localhost; child-src
226 ''self'' blob: http://localhost; worker-src ''self'' blob: http://localhost'
227 Content-Type:
228 - application/json; charset=utf-8
229 ETag:
230 - W/"e28cea671d77758e8cd2652347a030d1"
231 Link:
232 - <http://localhost:3000/api/v1/bookmarks?limit=1&max_id=11>; rel="next", <http://localhost:3000/api/v1/bookmarks?limit=1&min_id=11>;
233 rel="prev"
234 Referrer-Policy:
235 - strict-origin-when-cross-origin
236 Transfer-Encoding:
237 - chunked
238 Vary:
239 - Accept, Accept-Encoding, Origin
240 X-Content-Type-Options:
241 - nosniff
242 X-Download-Options:
243 - noopen
244 X-Frame-Options:
245 - SAMEORIGIN
246 X-Permitted-Cross-Domain-Policies:
247 - none
248 X-Request-Id:
249 - 7c887921-a7ee-478d-8e68-61359f4eacaf
250 X-Runtime:
251 - '0.037690'
252 X-XSS-Protection:
253 - 1; mode=block
254 content-length:
255 - '1309'
256 status:
257 code: 200
258 message: OK
259- request:
260 body: null
261 headers:
262 Accept:
263 - '*/*'
264 Accept-Encoding:
265 - gzip, deflate
266 Authorization:
267 - Bearer __MASTODON_PY_TEST_ACCESS_TOKEN
268 Connection:
269 - keep-alive
270 Content-Length:
271 - '0'
272 User-Agent:
273 - python-requests/2.22.0
99 method: POST 274 method: POST
100 uri: http://localhost:3000/api/v1/statuses/103704183225122470/unbookmark 275 uri: http://localhost:3000/api/v1/statuses/108532515807337403/unbookmark
101 response: 276 response:
102 body: {string: '{"id":"103704183225122470","created_at":"2020-02-22T19:37:36.738Z","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/103704183225122470","url":"http://localhost/@mastodonpy_test/103704183225122470","replies_count":0,"reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"content":"\u003cp\u003eToot!\u003c/p\u003e","reblog":null,"application":{"name":"Mastodon.py 277 body:
103 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}'} 278 string: '{"id":"108532515807337403","created_at":"2022-06-24T12:46:05.129Z","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/108532515807337403","url":"http://localhost/@mastodonpy_test/108532515807337403","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"content":"\u003cp\u003eToot!\u003c/p\u003e","reblog":null,"application":{"name":"Mastodon.py
279 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":true,"bot":false,"discoverable":null,"group":false,"created_at":"2022-06-24T00:00:00.000Z","note":"","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":"2022-06-24","emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null}'
104 headers: 280 headers:
105 Cache-Control: ['no-cache, no-store'] 281 Cache-Control:
106 Content-Type: [application/json; charset=utf-8] 282 - no-store
107 Referrer-Policy: [strict-origin-when-cross-origin] 283 Content-Security-Policy:
108 Transfer-Encoding: [chunked] 284 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src
109 Vary: ['Accept-Encoding, Origin'] 285 ''self'' http://localhost; img-src ''self'' https: data: blob: http://localhost;
110 X-Content-Type-Options: [nosniff] 286 style-src ''self'' http://localhost ''nonce-x2CjCkxjnkvgJiPtS/CoIg==''; media-src
111 X-Download-Options: [noopen] 287 ''self'' https: data: http://localhost; frame-src ''self'' https:; manifest-src
112 X-Frame-Options: [SAMEORIGIN] 288 ''self'' http://localhost; connect-src ''self'' data: blob: http://localhost
113 X-Permitted-Cross-Domain-Policies: [none] 289 http://files.example.com ws://localhost:4000 ws://localhost:3035 http://localhost:3035;
114 X-Request-Id: [d9792c38-ab1e-46de-9737-704433ad8f94] 290 script-src ''self'' ''unsafe-inline'' ''unsafe-eval'' http://localhost; child-src
115 X-Runtime: ['0.095876'] 291 ''self'' blob: http://localhost; worker-src ''self'' blob: http://localhost'
116 X-XSS-Protection: [1; mode=block] 292 Content-Type:
117 content-length: ['1320'] 293 - application/json; charset=utf-8
118 status: {code: 200, message: OK} 294 ETag:
295 - W/"16c19c98c5667003bada6cc08d6a9efd"
296 Referrer-Policy:
297 - strict-origin-when-cross-origin
298 Transfer-Encoding:
299 - chunked
300 Vary:
301 - Accept, Accept-Encoding, Origin
302 X-Content-Type-Options:
303 - nosniff
304 X-Download-Options:
305 - noopen
306 X-Frame-Options:
307 - SAMEORIGIN
308 X-Permitted-Cross-Domain-Policies:
309 - none
310 X-Request-Id:
311 - 61142a88-6453-47c6-8230-6b6196efb64c
312 X-Runtime:
313 - '0.035340'
314 X-XSS-Protection:
315 - 1; mode=block
316 content-length:
317 - '1308'
318 status:
319 code: 200
320 message: OK
119- request: 321- request:
120 body: null 322 body: null
121 headers: 323 headers:
122 Accept: ['*/*'] 324 Accept:
123 Accept-Encoding: ['gzip, deflate'] 325 - '*/*'
124 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN] 326 Accept-Encoding:
125 Connection: [keep-alive] 327 - gzip, deflate
126 User-Agent: [python-requests/2.18.4] 328 Authorization:
329 - Bearer __MASTODON_PY_TEST_ACCESS_TOKEN
330 Connection:
331 - keep-alive
332 User-Agent:
333 - python-requests/2.22.0
127 method: GET 334 method: GET
128 uri: http://localhost:3000/api/v1/bookmarks 335 uri: http://localhost:3000/api/v1/bookmarks
129 response: 336 response:
130 body: {string: '[]'} 337 body:
338 string: '[]'
131 headers: 339 headers:
132 Cache-Control: ['no-cache, no-store'] 340 Cache-Control:
133 Content-Type: [application/json; charset=utf-8] 341 - no-store
134 Referrer-Policy: [strict-origin-when-cross-origin] 342 Content-Security-Policy:
135 Transfer-Encoding: [chunked] 343 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src
136 Vary: ['Accept-Encoding, Origin'] 344 ''self'' http://localhost; img-src ''self'' https: data: blob: http://localhost;
137 X-Content-Type-Options: [nosniff] 345 style-src ''self'' http://localhost ''nonce-i6oSjmQ5IE8wtOR+vDrGZw==''; media-src
138 X-Download-Options: [noopen] 346 ''self'' https: data: http://localhost; frame-src ''self'' https:; manifest-src
139 X-Frame-Options: [SAMEORIGIN] 347 ''self'' http://localhost; connect-src ''self'' data: blob: http://localhost
140 X-Permitted-Cross-Domain-Policies: [none] 348 http://files.example.com ws://localhost:4000 ws://localhost:3035 http://localhost:3035;
141 X-Request-Id: [8454c5ef-5f23-43b9-89d8-dc1b1605f7ac] 349 script-src ''self'' ''unsafe-inline'' ''unsafe-eval'' http://localhost; child-src
142 X-Runtime: ['0.035375'] 350 ''self'' blob: http://localhost; worker-src ''self'' blob: http://localhost'
143 X-XSS-Protection: [1; mode=block] 351 Content-Type:
144 content-length: ['2'] 352 - application/json; charset=utf-8
145 status: {code: 200, message: OK} 353 ETag:
354 - W/"aaa12070e167024a89ca985596a44579"
355 Referrer-Policy:
356 - strict-origin-when-cross-origin
357 Transfer-Encoding:
358 - chunked
359 Vary:
360 - Accept, Accept-Encoding, Origin
361 X-Content-Type-Options:
362 - nosniff
363 X-Download-Options:
364 - noopen
365 X-Frame-Options:
366 - SAMEORIGIN
367 X-Permitted-Cross-Domain-Policies:
368 - none
369 X-Request-Id:
370 - 639bbb25-65a5-44eb-a886-d7092f891ecb
371 X-Runtime:
372 - '0.014781'
373 X-XSS-Protection:
374 - 1; mode=block
375 content-length:
376 - '2'
377 status:
378 code: 200
379 message: OK
146- request: 380- request:
147 body: null 381 body: null
148 headers: 382 headers:
149 Accept: ['*/*'] 383 Accept:
150 Accept-Encoding: ['gzip, deflate'] 384 - '*/*'
151 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN] 385 Accept-Encoding:
152 Connection: [keep-alive] 386 - gzip, deflate
153 Content-Length: ['0'] 387 Authorization:
154 User-Agent: [python-requests/2.18.4] 388 - Bearer __MASTODON_PY_TEST_ACCESS_TOKEN
389 Connection:
390 - keep-alive
391 Content-Length:
392 - '0'
393 User-Agent:
394 - python-requests/2.22.0
155 method: DELETE 395 method: DELETE
156 uri: http://localhost:3000/api/v1/statuses/103704183225122470 396 uri: http://localhost:3000/api/v1/statuses/108532515807337403
157 response: 397 response:
158 body: {string: '{"id":"103704183225122470","created_at":"2020-02-22T19:37:36.738Z","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/103704183225122470","url":"http://localhost/@mastodonpy_test/103704183225122470","replies_count":0,"reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"text":"Toot!","reblog":null,"application":{"name":"Mastodon.py 398 body:
159 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}'} 399 string: '{"id":"108532515807337403","created_at":"2022-06-24T12:46:05.129Z","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/108532515807337403","url":"http://localhost/@mastodonpy_test/108532515807337403","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"text":"Toot!","reblog":null,"application":{"name":"Mastodon.py
400 test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":true,"bot":false,"discoverable":null,"group":false,"created_at":"2022-06-24T00:00:00.000Z","note":"","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":0,"last_status_at":"2022-06-24","emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null}'
160 headers: 401 headers:
161 Cache-Control: ['no-cache, no-store'] 402 Cache-Control:
162 Content-Type: [application/json; charset=utf-8] 403 - no-store
163 Referrer-Policy: [strict-origin-when-cross-origin] 404 Content-Security-Policy:
164 Transfer-Encoding: [chunked] 405 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src
165 Vary: ['Accept-Encoding, Origin'] 406 ''self'' http://localhost; img-src ''self'' https: data: blob: http://localhost;
166 X-Content-Type-Options: [nosniff] 407 style-src ''self'' http://localhost ''nonce-9ZHC6oHcDEPPkskChbQjOQ==''; media-src
167 X-Download-Options: [noopen] 408 ''self'' https: data: http://localhost; frame-src ''self'' https:; manifest-src
168 X-Frame-Options: [SAMEORIGIN] 409 ''self'' http://localhost; connect-src ''self'' data: blob: http://localhost
169 X-Permitted-Cross-Domain-Policies: [none] 410 http://files.example.com ws://localhost:4000 ws://localhost:3035 http://localhost:3035;
170 X-Request-Id: [c222a2ef-6671-4d1c-97be-0a4e2b2f6a14] 411 script-src ''self'' ''unsafe-inline'' ''unsafe-eval'' http://localhost; child-src
171 X-Runtime: ['0.122283'] 412 ''self'' blob: http://localhost; worker-src ''self'' blob: http://localhost'
172 X-XSS-Protection: [1; mode=block] 413 Content-Type:
173 content-length: ['1290'] 414 - application/json; charset=utf-8
174 status: {code: 200, message: OK} 415 ETag:
416 - W/"efc9742f5a2c445d981fd8b15ed77122"
417 Referrer-Policy:
418 - strict-origin-when-cross-origin
419 Transfer-Encoding:
420 - chunked
421 Vary:
422 - Accept, Accept-Encoding, Origin
423 X-Content-Type-Options:
424 - nosniff
425 X-Download-Options:
426 - noopen
427 X-Frame-Options:
428 - SAMEORIGIN
429 X-Permitted-Cross-Domain-Policies:
430 - none
431 X-Request-Id:
432 - 1ca08d80-70b4-4aa9-abfe-5ca3286f63b8
433 X-Runtime:
434 - '0.037653'
435 X-XSS-Protection:
436 - 1; mode=block
437 content-length:
438 - '1278'
439 status:
440 code: 200
441 message: OK
175version: 1 442version: 1
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_bookmarks.py b/tests/test_bookmarks.py
index a90a43e..e5e0d7c 100644
--- a/tests/test_bookmarks.py
+++ b/tests/test_bookmarks.py
@@ -11,6 +11,11 @@ def test_bookmarks(api, status):
11 assert len(bookmarked_statuses) > 0 11 assert len(bookmarked_statuses) > 0
12 assert status_bookmarked == bookmarked_statuses[0] 12 assert status_bookmarked == bookmarked_statuses[0]
13 13
14 bookmarked_statuses = api.bookmarks(limit=1)
15 assert bookmarked_statuses
16 assert len(bookmarked_statuses) > 0
17 assert status_bookmarked == bookmarked_statuses[0]
18
14 status_unbookmarked = api.status_unbookmark(status_bookmarked) 19 status_unbookmarked = api.status_unbookmark(status_bookmarked)
15 assert status_unbookmarked 20 assert status_unbookmarked
16 assert status_unbookmarked.bookmarked == False 21 assert status_unbookmarked.bookmarked == False
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
diff --git a/tests/test_streaming.py b/tests/test_streaming.py
index cddb79a..8912b9c 100644
--- a/tests/test_streaming.py
+++ b/tests/test_streaming.py
@@ -61,6 +61,8 @@ class Listener(StreamListener):
61 self.notifications = [] 61 self.notifications = []
62 self.deletes = [] 62 self.deletes = []
63 self.heartbeats = 0 63 self.heartbeats = 0
64 self.bla_called = False
65 self.do_something_called = False
64 66
65 def on_update(self, status): 67 def on_update(self, status):
66 self.updates.append(status) 68 self.updates.append(status)
@@ -72,6 +74,11 @@ class Listener(StreamListener):
72 self.deletes.append(status_id) 74 self.deletes.append(status_id)
73 75
74 def on_blahblah(self, data): 76 def on_blahblah(self, data):
77 self.bla_called = True
78 pass
79
80 def on_do_something(self, data):
81 self.do_something_called = True
75 pass 82 pass
76 83
77 def handle_heartbeat(self): 84 def handle_heartbeat(self):
@@ -158,6 +165,37 @@ def test_unknown_event():
158 'data: {}', 165 'data: {}',
159 '', 166 '',
160 ]) 167 ])
168 assert listener.bla_called == True
169 assert listener.updates == []
170 assert listener.notifications == []
171 assert listener.deletes == []
172 assert listener.heartbeats == 0
173
174def test_unknown_handled_event():
175 """Be tolerant of new unknown event types, if on_unknown_event is available"""
176 listener = Listener()
177 listener.on_unknown_event = lambda name, payload: None
178
179 listener.handle_stream_([
180 'event: complete.new.event',
181 'data: {"k": "v"}',
182 '',
183 ])
184
185 assert listener.updates == []
186 assert listener.notifications == []
187 assert listener.deletes == []
188 assert listener.heartbeats == 0
189
190def test_dotted_unknown_event():
191 """Be tolerant of new event types with dots in the event-name"""
192 listener = Listener()
193 listener.handle_stream_([
194 'event: do.something',
195 'data: {}',
196 '',
197 ])
198 assert listener.do_something_called == True
161 assert listener.updates == [] 199 assert listener.updates == []
162 assert listener.notifications == [] 200 assert listener.notifications == []
163 assert listener.deletes == [] 201 assert listener.deletes == []
@@ -169,7 +207,7 @@ def test_invalid_event():
169 with pytest.raises(MastodonMalformedEventError): 207 with pytest.raises(MastodonMalformedEventError):
170 listener.handle_stream_([ 208 listener.handle_stream_([
171 'event: whatup', 209 'event: whatup',
172 'data: {}', 210 'data: {"k": "v"}',
173 '', 211 '',
174 ]) 212 ])
175 213
Powered by cgit v1.2.3 (git 2.41.0)