aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorhalcy <halcy@ARARAGI-KUN>2022-11-17 22:00:37 +0200
committerhalcy <halcy@ARARAGI-KUN>2022-11-17 22:00:37 +0200
commit725f79466de65743df0c3498a1bb08e106b5209e (patch)
tree556b797c38768bef5039f58713536f7072afaf40 /tests
parentec0194c643d1a59cae8a6c8137f382db8fb4e0aa (diff)
downloadmastodon.py-725f79466de65743df0c3498a1bb08e106b5209e.tar.gz
Fix tests
Diffstat (limited to 'tests')
-rw-r--r--tests/cassettes/test_min_max_id_datetimes.yaml56
-rw-r--r--tests/cassettes/test_min_max_id_datetimes_datetimeobjects.pklbin0 -> 93 bytes
-rw-r--r--tests/cassettes/test_scheduled_status.yaml112
-rw-r--r--tests/cassettes/test_scheduled_status_datetimeobjects.pklbin0 -> 53 bytes
-rw-r--r--tests/test_status.py10
-rw-r--r--tests/test_timeline.py12
6 files changed, 105 insertions, 85 deletions
diff --git a/tests/cassettes/test_min_max_id_datetimes.yaml b/tests/cassettes/test_min_max_id_datetimes.yaml
index 51414f0..7b5a274 100644
--- a/tests/cassettes/test_min_max_id_datetimes.yaml
+++ b/tests/cassettes/test_min_max_id_datetimes.yaml
@@ -20,17 +20,17 @@ interactions:
20 uri: http://localhost:3000/api/v1/statuses 20 uri: http://localhost:3000/api/v1/statuses
21 response: 21 response:
22 body: 22 body:
23 string: '{"id":"109360644459818976","created_at":"2022-11-17T18:50:05.553Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost:3000/users/mastodonpy_test/statuses/109360644459818976","url":"http://localhost:3000/@mastodonpy_test/109360644459818976","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","filtered":[],"reblog":null,"application":{"name":"Mastodon.py 23 string: '{"id":"109360920389596939","created_at":"2022-11-17T20:00:15.907Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost:3000/users/mastodonpy_test/statuses/109360920389596939","url":"http://localhost:3000/@mastodonpy_test/109360920389596939","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","filtered":[],"reblog":null,"application":{"name":"Mastodon.py
24 test suite","website":null},"account":{"id":"109337440686176140","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"John 24 test suite","website":null},"account":{"id":"109337440686176140","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"John
25 Lennon","locked":true,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-13T00:00:00.000Z","note":"\u003cp\u003eI 25 Lennon","locked":true,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-13T00:00:00.000Z","note":"\u003cp\u003eI
26 walk funny\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/system/accounts/avatars/109/337/440/686/176/140/original/d6cd9a5a5e65da30.jpg","avatar_static":"http://localhost:3000/system/accounts/avatars/109/337/440/686/176/140/original/d6cd9a5a5e65da30.jpg","header":"http://localhost:3000/system/accounts/headers/109/337/440/686/176/140/original/2b7760a42692fbde.jpg","header_static":"http://localhost:3000/system/accounts/headers/109/337/440/686/176/140/original/2b7760a42692fbde.jpg","followers_count":0,"following_count":0,"statuses_count":5,"last_status_at":"2022-11-17","noindex":false,"emojis":[],"fields":[{"name":"bread","value":"toasty.","verified_at":null},{"name":"lasagna","value":"no!!!","verified_at":null}]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null}' 26 walk funny\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/system/accounts/avatars/109/337/440/686/176/140/original/d6cd9a5a5e65da30.jpg","avatar_static":"http://localhost:3000/system/accounts/avatars/109/337/440/686/176/140/original/d6cd9a5a5e65da30.jpg","header":"http://localhost:3000/system/accounts/headers/109/337/440/686/176/140/original/2b7760a42692fbde.jpg","header_static":"http://localhost:3000/system/accounts/headers/109/337/440/686/176/140/original/2b7760a42692fbde.jpg","followers_count":0,"following_count":0,"statuses_count":7,"last_status_at":"2022-11-17","noindex":false,"emojis":[],"fields":[{"name":"bread","value":"toasty.","verified_at":null},{"name":"lasagna","value":"no!!!","verified_at":null}]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null}'
27 headers: 27 headers:
28 Cache-Control: 28 Cache-Control:
29 - no-store 29 - no-store
30 Content-Security-Policy: 30 Content-Security-Policy:
31 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src 31 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src
32 ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; 32 ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000;
33 style-src ''self'' http://localhost:3000 ''nonce-GNnrTSvg1wDIabQ3kjtGyQ==''; 33 style-src ''self'' http://localhost:3000 ''nonce-eu9ApZVeWmOtnW3cjhpGVg=='';
34 media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' 34 media-src ''self'' https: data: http://localhost:3000; frame-src ''self''
35 https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' 35 https:; manifest-src ''self'' http://localhost:3000; connect-src ''self''
36 data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 36 data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000
@@ -40,7 +40,7 @@ interactions:
40 Content-Type: 40 Content-Type:
41 - application/json; charset=utf-8 41 - application/json; charset=utf-8
42 ETag: 42 ETag:
43 - W/"58511b0f15d0c3ac192c75655d58aca2" 43 - W/"1b1f51ff5c8829fe893b287e7435a814"
44 Referrer-Policy: 44 Referrer-Policy:
45 - strict-origin-when-cross-origin 45 - strict-origin-when-cross-origin
46 Transfer-Encoding: 46 Transfer-Encoding:
@@ -58,13 +58,13 @@ interactions:
58 X-RateLimit-Limit: 58 X-RateLimit-Limit:
59 - '300' 59 - '300'
60 X-RateLimit-Remaining: 60 X-RateLimit-Remaining:
61 - '294' 61 - '291'
62 X-RateLimit-Reset: 62 X-RateLimit-Reset:
63 - '2022-11-17T21:00:00.626208Z' 63 - '2022-11-17T21:00:00.931702Z'
64 X-Request-Id: 64 X-Request-Id:
65 - 07b95dd9-1b8c-403d-84d7-9086e3d1f875 65 - 1d7fbb0b-3d84-4da4-8fd1-1a8eb47e6bdd
66 X-Runtime: 66 X-Runtime:
67 - '0.103956' 67 - '0.037621'
68 X-XSS-Protection: 68 X-XSS-Protection:
69 - 1; mode=block 69 - 1; mode=block
70 status: 70 status:
@@ -84,20 +84,20 @@ interactions:
84 User-Agent: 84 User-Agent:
85 - tests/v311 85 - tests/v311
86 method: GET 86 method: GET
87 uri: http://localhost:3000/api/v1/timelines/home?max_id=109360645734400000&min_id=109360643112960000 87 uri: http://localhost:3000/api/v1/timelines/home?max_id=109360921640960000&min_id=109360919019520000
88 response: 88 response:
89 body: 89 body:
90 string: '[{"id":"109360644459818976","created_at":"2022-11-17T18:50:05.553Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost:3000/users/mastodonpy_test/statuses/109360644459818976","url":"http://localhost:3000/@mastodonpy_test/109360644459818976","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","filtered":[],"reblog":null,"application":{"name":"Mastodon.py 90 string: '[{"id":"109360920389596939","created_at":"2022-11-17T20:00:15.907Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost:3000/users/mastodonpy_test/statuses/109360920389596939","url":"http://localhost:3000/@mastodonpy_test/109360920389596939","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","filtered":[],"reblog":null,"application":{"name":"Mastodon.py
91 test suite","website":null},"account":{"id":"109337440686176140","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"John 91 test suite","website":null},"account":{"id":"109337440686176140","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"John
92 Lennon","locked":true,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-13T00:00:00.000Z","note":"\u003cp\u003eI 92 Lennon","locked":true,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-13T00:00:00.000Z","note":"\u003cp\u003eI
93 walk funny\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/system/accounts/avatars/109/337/440/686/176/140/original/d6cd9a5a5e65da30.jpg","avatar_static":"http://localhost:3000/system/accounts/avatars/109/337/440/686/176/140/original/d6cd9a5a5e65da30.jpg","header":"http://localhost:3000/system/accounts/headers/109/337/440/686/176/140/original/2b7760a42692fbde.jpg","header_static":"http://localhost:3000/system/accounts/headers/109/337/440/686/176/140/original/2b7760a42692fbde.jpg","followers_count":0,"following_count":0,"statuses_count":5,"last_status_at":"2022-11-17","noindex":false,"emojis":[],"fields":[{"name":"bread","value":"toasty.","verified_at":null},{"name":"lasagna","value":"no!!!","verified_at":null}]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null}]' 93 walk funny\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/system/accounts/avatars/109/337/440/686/176/140/original/d6cd9a5a5e65da30.jpg","avatar_static":"http://localhost:3000/system/accounts/avatars/109/337/440/686/176/140/original/d6cd9a5a5e65da30.jpg","header":"http://localhost:3000/system/accounts/headers/109/337/440/686/176/140/original/2b7760a42692fbde.jpg","header_static":"http://localhost:3000/system/accounts/headers/109/337/440/686/176/140/original/2b7760a42692fbde.jpg","followers_count":0,"following_count":0,"statuses_count":7,"last_status_at":"2022-11-17","noindex":false,"emojis":[],"fields":[{"name":"bread","value":"toasty.","verified_at":null},{"name":"lasagna","value":"no!!!","verified_at":null}]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null}]'
94 headers: 94 headers:
95 Cache-Control: 95 Cache-Control:
96 - no-store 96 - no-store
97 Content-Security-Policy: 97 Content-Security-Policy:
98 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src 98 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src
99 ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; 99 ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000;
100 style-src ''self'' http://localhost:3000 ''nonce-S6/DmjeVOHI/8no8CZqoEA==''; 100 style-src ''self'' http://localhost:3000 ''nonce-BVkzXWWXoczXLIl9nwSoWw=='';
101 media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' 101 media-src ''self'' https: data: http://localhost:3000; frame-src ''self''
102 https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' 102 https:; manifest-src ''self'' http://localhost:3000; connect-src ''self''
103 data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 103 data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000
@@ -107,10 +107,10 @@ interactions:
107 Content-Type: 107 Content-Type:
108 - application/json; charset=utf-8 108 - application/json; charset=utf-8
109 ETag: 109 ETag:
110 - W/"86a06105a5e70f233a95eea2721f69ee" 110 - W/"a0a4a89f2613e8efe1b7ff788d6a56f5"
111 Link: 111 Link:
112 - <http://localhost:3000/api/v1/timelines/home?max_id=109360644459818976>; rel="next", 112 - <http://localhost:3000/api/v1/timelines/home?max_id=109360920389596939>; rel="next",
113 <http://localhost:3000/api/v1/timelines/home?min_id=109360644459818976>; rel="prev" 113 <http://localhost:3000/api/v1/timelines/home?min_id=109360920389596939>; rel="prev"
114 Referrer-Policy: 114 Referrer-Policy:
115 - strict-origin-when-cross-origin 115 - strict-origin-when-cross-origin
116 Transfer-Encoding: 116 Transfer-Encoding:
@@ -126,9 +126,9 @@ interactions:
126 X-Permitted-Cross-Domain-Policies: 126 X-Permitted-Cross-Domain-Policies:
127 - none 127 - none
128 X-Request-Id: 128 X-Request-Id:
129 - 738b28f0-169a-49b8-89bf-97dfc60608c8 129 - f9e7cc0b-47e5-4b02-9da2-fc41574a8d2a
130 X-Runtime: 130 X-Runtime:
131 - '0.029525' 131 - '0.021379'
132 X-XSS-Protection: 132 X-XSS-Protection:
133 - 1; mode=block 133 - 1; mode=block
134 status: 134 status:
@@ -148,7 +148,7 @@ interactions:
148 User-Agent: 148 User-Agent:
149 - tests/v311 149 - tests/v311
150 method: GET 150 method: GET
151 uri: http://localhost:3000/api/v1/timelines/home?max_id=109360647045120000&min_id=109360645734400000 151 uri: http://localhost:3000/api/v1/timelines/home?max_id=109360922951680000&min_id=109360921640960000
152 response: 152 response:
153 body: 153 body:
154 string: '[]' 154 string: '[]'
@@ -158,7 +158,7 @@ interactions:
158 Content-Security-Policy: 158 Content-Security-Policy:
159 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src 159 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src
160 ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; 160 ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000;
161 style-src ''self'' http://localhost:3000 ''nonce-V/vKOm6+nPmC5SpFFwp80w==''; 161 style-src ''self'' http://localhost:3000 ''nonce-pzcUQhXaLhmCAXOMbYOrTg=='';
162 media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' 162 media-src ''self'' https: data: http://localhost:3000; frame-src ''self''
163 https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' 163 https:; manifest-src ''self'' http://localhost:3000; connect-src ''self''
164 data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 164 data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000
@@ -184,9 +184,9 @@ interactions:
184 X-Permitted-Cross-Domain-Policies: 184 X-Permitted-Cross-Domain-Policies:
185 - none 185 - none
186 X-Request-Id: 186 X-Request-Id:
187 - e7c84272-bb28-42ca-a59e-cce7539844ad 187 - 01914c1c-b360-461d-a68e-e7b0bc156447
188 X-Runtime: 188 X-Runtime:
189 - '0.009517' 189 - '0.008764'
190 X-XSS-Protection: 190 X-XSS-Protection:
191 - 1; mode=block 191 - 1; mode=block
192 status: 192 status:
@@ -208,20 +208,20 @@ interactions:
208 User-Agent: 208 User-Agent:
209 - tests/v311 209 - tests/v311
210 method: DELETE 210 method: DELETE
211 uri: http://localhost:3000/api/v1/statuses/109360644459818976 211 uri: http://localhost:3000/api/v1/statuses/109360920389596939
212 response: 212 response:
213 body: 213 body:
214 string: '{"id":"109360644459818976","created_at":"2022-11-17T18:50:05.553Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost:3000/users/mastodonpy_test/statuses/109360644459818976","url":"http://localhost:3000/@mastodonpy_test/109360644459818976","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"text":"Toot!","filtered":[],"reblog":null,"application":{"name":"Mastodon.py 214 string: '{"id":"109360920389596939","created_at":"2022-11-17T20:00:15.907Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost:3000/users/mastodonpy_test/statuses/109360920389596939","url":"http://localhost:3000/@mastodonpy_test/109360920389596939","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"text":"Toot!","filtered":[],"reblog":null,"application":{"name":"Mastodon.py
215 test suite","website":null},"account":{"id":"109337440686176140","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"John 215 test suite","website":null},"account":{"id":"109337440686176140","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"John
216 Lennon","locked":true,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-13T00:00:00.000Z","note":"\u003cp\u003eI 216 Lennon","locked":true,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-13T00:00:00.000Z","note":"\u003cp\u003eI
217 walk funny\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/system/accounts/avatars/109/337/440/686/176/140/original/d6cd9a5a5e65da30.jpg","avatar_static":"http://localhost:3000/system/accounts/avatars/109/337/440/686/176/140/original/d6cd9a5a5e65da30.jpg","header":"http://localhost:3000/system/accounts/headers/109/337/440/686/176/140/original/2b7760a42692fbde.jpg","header_static":"http://localhost:3000/system/accounts/headers/109/337/440/686/176/140/original/2b7760a42692fbde.jpg","followers_count":0,"following_count":0,"statuses_count":4,"last_status_at":"2022-11-17","noindex":false,"emojis":[],"fields":[{"name":"bread","value":"toasty.","verified_at":null},{"name":"lasagna","value":"no!!!","verified_at":null}]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null}' 217 walk funny\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/system/accounts/avatars/109/337/440/686/176/140/original/d6cd9a5a5e65da30.jpg","avatar_static":"http://localhost:3000/system/accounts/avatars/109/337/440/686/176/140/original/d6cd9a5a5e65da30.jpg","header":"http://localhost:3000/system/accounts/headers/109/337/440/686/176/140/original/2b7760a42692fbde.jpg","header_static":"http://localhost:3000/system/accounts/headers/109/337/440/686/176/140/original/2b7760a42692fbde.jpg","followers_count":0,"following_count":0,"statuses_count":6,"last_status_at":"2022-11-17","noindex":false,"emojis":[],"fields":[{"name":"bread","value":"toasty.","verified_at":null},{"name":"lasagna","value":"no!!!","verified_at":null}]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null}'
218 headers: 218 headers:
219 Cache-Control: 219 Cache-Control:
220 - no-store 220 - no-store
221 Content-Security-Policy: 221 Content-Security-Policy:
222 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src 222 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src
223 ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; 223 ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000;
224 style-src ''self'' http://localhost:3000 ''nonce-+b0YxTzjfZxXGiiUjfZehw==''; 224 style-src ''self'' http://localhost:3000 ''nonce-JQ6J37EfMdjQbrYXpw7SOw=='';
225 media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' 225 media-src ''self'' https: data: http://localhost:3000; frame-src ''self''
226 https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' 226 https:; manifest-src ''self'' http://localhost:3000; connect-src ''self''
227 data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 227 data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000
@@ -231,7 +231,7 @@ interactions:
231 Content-Type: 231 Content-Type:
232 - application/json; charset=utf-8 232 - application/json; charset=utf-8
233 ETag: 233 ETag:
234 - W/"02008e45c6ebce96f6e4e9ec2354008b" 234 - W/"1ae721011c6bf203187d567b52a82145"
235 Referrer-Policy: 235 Referrer-Policy:
236 - strict-origin-when-cross-origin 236 - strict-origin-when-cross-origin
237 Transfer-Encoding: 237 Transfer-Encoding:
@@ -247,9 +247,9 @@ interactions:
247 X-Permitted-Cross-Domain-Policies: 247 X-Permitted-Cross-Domain-Policies:
248 - none 248 - none
249 X-Request-Id: 249 X-Request-Id:
250 - 0eed8861-4f33-4cbc-85c4-cc45f270a344 250 - f82b9cd7-463b-4142-9034-ba19dfb323d0
251 X-Runtime: 251 X-Runtime:
252 - '0.036224' 252 - '0.023947'
253 X-XSS-Protection: 253 X-XSS-Protection:
254 - 1; mode=block 254 - 1; mode=block
255 status: 255 status:
diff --git a/tests/cassettes/test_min_max_id_datetimes_datetimeobjects.pkl b/tests/cassettes/test_min_max_id_datetimes_datetimeobjects.pkl
new file mode 100644
index 0000000..dbcbed1
--- /dev/null
+++ b/tests/cassettes/test_min_max_id_datetimes_datetimeobjects.pkl
Binary files differ
diff --git a/tests/cassettes/test_scheduled_status.yaml b/tests/cassettes/test_scheduled_status.yaml
index 9fbf6f2..2d860f0 100644
--- a/tests/cassettes/test_scheduled_status.yaml
+++ b/tests/cassettes/test_scheduled_status.yaml
@@ -20,7 +20,7 @@ interactions:
20 uri: http://localhost:3000/api/v1/statuses 20 uri: http://localhost:3000/api/v1/statuses
21 response: 21 response:
22 body: 22 body:
23 string: '{"id":"3","scheduled_at":"4000-01-01T14:33:14.000Z","params":{"text":"please 23 string: '{"id":"8","scheduled_at":"4000-01-01T14:33:14.000Z","params":{"text":"please
24 ensure adequate headroom","media_ids":null,"sensitive":null,"spoiler_text":null,"visibility":null,"language":null,"scheduled_at":null,"poll":null,"idempotency":null,"with_rate_limit":false,"in_reply_to_id":null,"application_id":1234567890123456},"media_attachments":[]}' 24 ensure adequate headroom","media_ids":null,"sensitive":null,"spoiler_text":null,"visibility":null,"language":null,"scheduled_at":null,"poll":null,"idempotency":null,"with_rate_limit":false,"in_reply_to_id":null,"application_id":1234567890123456},"media_attachments":[]}'
25 headers: 25 headers:
26 Cache-Control: 26 Cache-Control:
@@ -28,7 +28,7 @@ interactions:
28 Content-Security-Policy: 28 Content-Security-Policy:
29 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src 29 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src
30 ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; 30 ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000;
31 style-src ''self'' http://localhost:3000 ''nonce-8MI0hLsUyrzDc4kIn3QyMg==''; 31 style-src ''self'' http://localhost:3000 ''nonce-Ak/w6f2hbeF+tQDO2xwBNw=='';
32 media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' 32 media-src ''self'' https: data: http://localhost:3000; frame-src ''self''
33 https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' 33 https:; manifest-src ''self'' http://localhost:3000; connect-src ''self''
34 data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 34 data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000
@@ -38,7 +38,7 @@ interactions:
38 Content-Type: 38 Content-Type:
39 - application/json; charset=utf-8 39 - application/json; charset=utf-8
40 ETag: 40 ETag:
41 - W/"e650d49830a41555fedcb7fb33b1142c" 41 - W/"1d6abb8ae5a6f0287532a204b61c688f"
42 Referrer-Policy: 42 Referrer-Policy:
43 - strict-origin-when-cross-origin 43 - strict-origin-when-cross-origin
44 Transfer-Encoding: 44 Transfer-Encoding:
@@ -56,13 +56,13 @@ interactions:
56 X-RateLimit-Limit: 56 X-RateLimit-Limit:
57 - '300' 57 - '300'
58 X-RateLimit-Remaining: 58 X-RateLimit-Remaining:
59 - '300' 59 - '293'
60 X-RateLimit-Reset: 60 X-RateLimit-Reset:
61 - '2022-11-17T21:00:00.569037Z' 61 - '2022-11-17T21:00:00.743922Z'
62 X-Request-Id: 62 X-Request-Id:
63 - 1f7204a9-6c93-444a-bc27-87fd8949027e 63 - 5e367318-8905-42f7-8b03-dfefef0b8544
64 X-Runtime: 64 X-Runtime:
65 - '0.229002' 65 - '0.025933'
66 X-XSS-Protection: 66 X-XSS-Protection:
67 - 1; mode=block 67 - 1; mode=block
68 status: 68 status:
@@ -86,10 +86,10 @@ interactions:
86 User-Agent: 86 User-Agent:
87 - tests/v311 87 - tests/v311
88 method: PUT 88 method: PUT
89 uri: http://localhost:3000/api/v1/scheduled_statuses/3 89 uri: http://localhost:3000/api/v1/scheduled_statuses/8
90 response: 90 response:
91 body: 91 body:
92 string: '{"id":"3","scheduled_at":"4000-01-01T14:23:14.000Z","params":{"poll":null,"text":"please 92 string: '{"id":"8","scheduled_at":"4000-01-01T14:23:14.000Z","params":{"poll":null,"text":"please
93 ensure adequate headroom","language":null,"media_ids":null,"sensitive":null,"visibility":null,"idempotency":null,"scheduled_at":null,"spoiler_text":null,"application_id":1234567890123456,"in_reply_to_id":null,"with_rate_limit":false},"media_attachments":[]}' 93 ensure adequate headroom","language":null,"media_ids":null,"sensitive":null,"visibility":null,"idempotency":null,"scheduled_at":null,"spoiler_text":null,"application_id":1234567890123456,"in_reply_to_id":null,"with_rate_limit":false},"media_attachments":[]}'
94 headers: 94 headers:
95 Cache-Control: 95 Cache-Control:
@@ -97,7 +97,7 @@ interactions:
97 Content-Security-Policy: 97 Content-Security-Policy:
98 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src 98 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src
99 ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; 99 ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000;
100 style-src ''self'' http://localhost:3000 ''nonce-dqsjmaaupc42lzB9CQahdw==''; 100 style-src ''self'' http://localhost:3000 ''nonce-stvmuoKpti0sNxM89xxgZA=='';
101 media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' 101 media-src ''self'' https: data: http://localhost:3000; frame-src ''self''
102 https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' 102 https:; manifest-src ''self'' http://localhost:3000; connect-src ''self''
103 data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 103 data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000
@@ -107,7 +107,7 @@ interactions:
107 Content-Type: 107 Content-Type:
108 - application/json; charset=utf-8 108 - application/json; charset=utf-8
109 ETag: 109 ETag:
110 - W/"c23cf5fde7455d325c6b924266e2e877" 110 - W/"ef1f9f079ab2e1fc61e245067021a431"
111 Referrer-Policy: 111 Referrer-Policy:
112 - strict-origin-when-cross-origin 112 - strict-origin-when-cross-origin
113 Transfer-Encoding: 113 Transfer-Encoding:
@@ -123,9 +123,9 @@ interactions:
123 X-Permitted-Cross-Domain-Policies: 123 X-Permitted-Cross-Domain-Policies:
124 - none 124 - none
125 X-Request-Id: 125 X-Request-Id:
126 - 45459a5d-1994-4eeb-8551-f1df97d9530b 126 - dcf2a73e-2c68-46d3-ad9d-691a830db5e1
127 X-Runtime: 127 X-Runtime:
128 - '0.016216' 128 - '0.012105'
129 X-XSS-Protection: 129 X-XSS-Protection:
130 - 1; mode=block 130 - 1; mode=block
131 status: 131 status:
@@ -148,7 +148,7 @@ interactions:
148 uri: http://localhost:3000/api/v1/scheduled_statuses 148 uri: http://localhost:3000/api/v1/scheduled_statuses
149 response: 149 response:
150 body: 150 body:
151 string: '[{"id":"3","scheduled_at":"4000-01-01T14:23:14.000Z","params":{"poll":null,"text":"please 151 string: '[{"id":"8","scheduled_at":"4000-01-01T14:23:14.000Z","params":{"poll":null,"text":"please
152 ensure adequate headroom","language":null,"media_ids":null,"sensitive":null,"visibility":null,"idempotency":null,"scheduled_at":null,"spoiler_text":null,"application_id":1234567890123456,"in_reply_to_id":null,"with_rate_limit":false},"media_attachments":[]}]' 152 ensure adequate headroom","language":null,"media_ids":null,"sensitive":null,"visibility":null,"idempotency":null,"scheduled_at":null,"spoiler_text":null,"application_id":1234567890123456,"in_reply_to_id":null,"with_rate_limit":false},"media_attachments":[]}]'
153 headers: 153 headers:
154 Cache-Control: 154 Cache-Control:
@@ -156,7 +156,7 @@ interactions:
156 Content-Security-Policy: 156 Content-Security-Policy:
157 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src 157 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src
158 ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; 158 ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000;
159 style-src ''self'' http://localhost:3000 ''nonce-ogS9JdJ7yVcKGhdGJ4ohvQ==''; 159 style-src ''self'' http://localhost:3000 ''nonce-uZuwulirf3GB1inWQ/FEBw=='';
160 media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' 160 media-src ''self'' https: data: http://localhost:3000; frame-src ''self''
161 https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' 161 https:; manifest-src ''self'' http://localhost:3000; connect-src ''self''
162 data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 162 data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000
@@ -166,9 +166,9 @@ interactions:
166 Content-Type: 166 Content-Type:
167 - application/json; charset=utf-8 167 - application/json; charset=utf-8
168 ETag: 168 ETag:
169 - W/"4695a11bc3761f561fbe599c1fa67707" 169 - W/"53412585062018a03512cca034ff85d4"
170 Link: 170 Link:
171 - <http://localhost:3000/api/v1/scheduled_statuses?min_id=3>; rel="prev" 171 - <http://localhost:3000/api/v1/scheduled_statuses?min_id=8>; rel="prev"
172 Referrer-Policy: 172 Referrer-Policy:
173 - strict-origin-when-cross-origin 173 - strict-origin-when-cross-origin
174 Transfer-Encoding: 174 Transfer-Encoding:
@@ -184,9 +184,9 @@ interactions:
184 X-Permitted-Cross-Domain-Policies: 184 X-Permitted-Cross-Domain-Policies:
185 - none 185 - none
186 X-Request-Id: 186 X-Request-Id:
187 - 05eec4ca-e7d5-4329-a6e2-d2c55ec462a7 187 - 4eab30ef-c087-4026-bcc5-22a0d80d5426
188 X-Runtime: 188 X-Runtime:
189 - '0.009847' 189 - '0.007217'
190 X-XSS-Protection: 190 X-XSS-Protection:
191 - 1; mode=block 191 - 1; mode=block
192 status: 192 status:
@@ -206,10 +206,10 @@ interactions:
206 User-Agent: 206 User-Agent:
207 - tests/v311 207 - tests/v311
208 method: GET 208 method: GET
209 uri: http://localhost:3000/api/v1/scheduled_statuses/3 209 uri: http://localhost:3000/api/v1/scheduled_statuses/8
210 response: 210 response:
211 body: 211 body:
212 string: '{"id":"3","scheduled_at":"4000-01-01T14:23:14.000Z","params":{"poll":null,"text":"please 212 string: '{"id":"8","scheduled_at":"4000-01-01T14:23:14.000Z","params":{"poll":null,"text":"please
213 ensure adequate headroom","language":null,"media_ids":null,"sensitive":null,"visibility":null,"idempotency":null,"scheduled_at":null,"spoiler_text":null,"application_id":1234567890123456,"in_reply_to_id":null,"with_rate_limit":false},"media_attachments":[]}' 213 ensure adequate headroom","language":null,"media_ids":null,"sensitive":null,"visibility":null,"idempotency":null,"scheduled_at":null,"spoiler_text":null,"application_id":1234567890123456,"in_reply_to_id":null,"with_rate_limit":false},"media_attachments":[]}'
214 headers: 214 headers:
215 Cache-Control: 215 Cache-Control:
@@ -217,7 +217,7 @@ interactions:
217 Content-Security-Policy: 217 Content-Security-Policy:
218 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src 218 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src
219 ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; 219 ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000;
220 style-src ''self'' http://localhost:3000 ''nonce-101mCoCwPrjnwSQ1RVvVkw==''; 220 style-src ''self'' http://localhost:3000 ''nonce-sDG/INd5trVXh399MBMRLg=='';
221 media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' 221 media-src ''self'' https: data: http://localhost:3000; frame-src ''self''
222 https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' 222 https:; manifest-src ''self'' http://localhost:3000; connect-src ''self''
223 data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 223 data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000
@@ -227,7 +227,7 @@ interactions:
227 Content-Type: 227 Content-Type:
228 - application/json; charset=utf-8 228 - application/json; charset=utf-8
229 ETag: 229 ETag:
230 - W/"c23cf5fde7455d325c6b924266e2e877" 230 - W/"ef1f9f079ab2e1fc61e245067021a431"
231 Referrer-Policy: 231 Referrer-Policy:
232 - strict-origin-when-cross-origin 232 - strict-origin-when-cross-origin
233 Transfer-Encoding: 233 Transfer-Encoding:
@@ -243,9 +243,9 @@ interactions:
243 X-Permitted-Cross-Domain-Policies: 243 X-Permitted-Cross-Domain-Policies:
244 - none 244 - none
245 X-Request-Id: 245 X-Request-Id:
246 - 7ae5d245-26f5-4169-ad0a-5857f2ae1e26 246 - 59c54621-0e4e-49e4-a78b-95bbedc22370
247 X-Runtime: 247 X-Runtime:
248 - '0.008526' 248 - '0.006789'
249 X-XSS-Protection: 249 X-XSS-Protection:
250 - 1; mode=block 250 - 1; mode=block
251 status: 251 status:
@@ -267,7 +267,7 @@ interactions:
267 User-Agent: 267 User-Agent:
268 - tests/v311 268 - tests/v311
269 method: DELETE 269 method: DELETE
270 uri: http://localhost:3000/api/v1/scheduled_statuses/3 270 uri: http://localhost:3000/api/v1/scheduled_statuses/8
271 response: 271 response:
272 body: 272 body:
273 string: '{}' 273 string: '{}'
@@ -277,7 +277,7 @@ interactions:
277 Content-Security-Policy: 277 Content-Security-Policy:
278 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src 278 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src
279 ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; 279 ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000;
280 style-src ''self'' http://localhost:3000 ''nonce-vq3gSI3BXir3TR5GiD2HRA==''; 280 style-src ''self'' http://localhost:3000 ''nonce-MxIQ3EKn0B1lCGfXe6p4Gg=='';
281 media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' 281 media-src ''self'' https: data: http://localhost:3000; frame-src ''self''
282 https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' 282 https:; manifest-src ''self'' http://localhost:3000; connect-src ''self''
283 data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 283 data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000
@@ -303,9 +303,9 @@ interactions:
303 X-Permitted-Cross-Domain-Policies: 303 X-Permitted-Cross-Domain-Policies:
304 - none 304 - none
305 X-Request-Id: 305 X-Request-Id:
306 - 43ad9ed4-979f-4fcd-8de1-a08017bf5101 306 - 47d7f0c0-e174-42f2-8506-86942fc5ebbf
307 X-Runtime: 307 X-Runtime:
308 - '0.012787' 308 - '0.010192'
309 X-XSS-Protection: 309 X-XSS-Protection:
310 - 1; mode=block 310 - 1; mode=block
311 status: 311 status:
@@ -335,7 +335,7 @@ interactions:
335 Content-Security-Policy: 335 Content-Security-Policy:
336 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src 336 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src
337 ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; 337 ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000;
338 style-src ''self'' http://localhost:3000 ''nonce-iUJq9NaSxMW8Tl46vhzO0g==''; 338 style-src ''self'' http://localhost:3000 ''nonce-vDFRE2ovp6xbVtXBXalZVw=='';
339 media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' 339 media-src ''self'' https: data: http://localhost:3000; frame-src ''self''
340 https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' 340 https:; manifest-src ''self'' http://localhost:3000; connect-src ''self''
341 data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 341 data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000
@@ -361,16 +361,16 @@ interactions:
361 X-Permitted-Cross-Domain-Policies: 361 X-Permitted-Cross-Domain-Policies:
362 - none 362 - none
363 X-Request-Id: 363 X-Request-Id:
364 - a280af2d-3f06-43e5-a7fd-81ee15ba423d 364 - c0a893ff-dde3-4bb4-ab03-8f4c70f26f22
365 X-Runtime: 365 X-Runtime:
366 - '0.007606' 366 - '0.007906'
367 X-XSS-Protection: 367 X-XSS-Protection:
368 - 1; mode=block 368 - 1; mode=block
369 status: 369 status:
370 code: 200 370 code: 200
371 message: OK 371 message: OK
372- request: 372- request:
373 body: status=please+ensure+adequate+headroom&scheduled_at=2022-11-17T18%3A33%3A45%2B00%3A00 373 body: status=please+ensure+adequate+headroom&scheduled_at=2022-11-17T19%3A58%3A07%2B00%3A00
374 headers: 374 headers:
375 Accept: 375 Accept:
376 - '*/*' 376 - '*/*'
@@ -390,18 +390,18 @@ interactions:
390 uri: http://localhost:3000/api/v1/statuses 390 uri: http://localhost:3000/api/v1/statuses
391 response: 391 response:
392 body: 392 body:
393 string: '{"id":"109360579914087110","created_at":"2022-11-17T18:33:40.663Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost:3000/users/mastodonpy_test/statuses/109360579914087110","url":"http://localhost:3000/@mastodonpy_test/109360579914087110","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"content":"\u003cp\u003eplease 393 string: '{"id":"109360911667710470","created_at":"2022-11-17T19:58:02.822Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost:3000/users/mastodonpy_test/statuses/109360911667710470","url":"http://localhost:3000/@mastodonpy_test/109360911667710470","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"content":"\u003cp\u003eplease
394 ensure adequate headroom\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py 394 ensure adequate headroom\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py
395 test suite","website":null},"account":{"id":"109337440686176140","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"John 395 test suite","website":null},"account":{"id":"109337440686176140","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"John
396 Lennon","locked":true,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-13T00:00:00.000Z","note":"\u003cp\u003eI 396 Lennon","locked":true,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-13T00:00:00.000Z","note":"\u003cp\u003eI
397 walk funny\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/system/accounts/avatars/109/337/440/686/176/140/original/d6cd9a5a5e65da30.jpg","avatar_static":"http://localhost:3000/system/accounts/avatars/109/337/440/686/176/140/original/d6cd9a5a5e65da30.jpg","header":"http://localhost:3000/system/accounts/headers/109/337/440/686/176/140/original/2b7760a42692fbde.jpg","header_static":"http://localhost:3000/system/accounts/headers/109/337/440/686/176/140/original/2b7760a42692fbde.jpg","followers_count":0,"following_count":0,"statuses_count":4,"last_status_at":"2022-11-17","noindex":false,"emojis":[],"fields":[{"name":"bread","value":"toasty.","verified_at":null},{"name":"lasagna","value":"no!!!","verified_at":null}]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null}' 397 walk funny\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/system/accounts/avatars/109/337/440/686/176/140/original/d6cd9a5a5e65da30.jpg","avatar_static":"http://localhost:3000/system/accounts/avatars/109/337/440/686/176/140/original/d6cd9a5a5e65da30.jpg","header":"http://localhost:3000/system/accounts/headers/109/337/440/686/176/140/original/2b7760a42692fbde.jpg","header_static":"http://localhost:3000/system/accounts/headers/109/337/440/686/176/140/original/2b7760a42692fbde.jpg","followers_count":0,"following_count":0,"statuses_count":6,"last_status_at":"2022-11-17","noindex":false,"emojis":[],"fields":[{"name":"bread","value":"toasty.","verified_at":null},{"name":"lasagna","value":"no!!!","verified_at":null}]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null}'
398 headers: 398 headers:
399 Cache-Control: 399 Cache-Control:
400 - no-store 400 - no-store
401 Content-Security-Policy: 401 Content-Security-Policy:
402 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src 402 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src
403 ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; 403 ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000;
404 style-src ''self'' http://localhost:3000 ''nonce-2aLo0w9hlVj9xfPOBdEXsg==''; 404 style-src ''self'' http://localhost:3000 ''nonce-8OI7FZj2LTcg0sMTtFIKsQ=='';
405 media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' 405 media-src ''self'' https: data: http://localhost:3000; frame-src ''self''
406 https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' 406 https:; manifest-src ''self'' http://localhost:3000; connect-src ''self''
407 data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 407 data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000
@@ -411,7 +411,7 @@ interactions:
411 Content-Type: 411 Content-Type:
412 - application/json; charset=utf-8 412 - application/json; charset=utf-8
413 ETag: 413 ETag:
414 - W/"fb00e7f8059ab81e322aa084d8875cb9" 414 - W/"3a893eeef2d4aae154d54e233344b05b"
415 Referrer-Policy: 415 Referrer-Policy:
416 - strict-origin-when-cross-origin 416 - strict-origin-when-cross-origin
417 Transfer-Encoding: 417 Transfer-Encoding:
@@ -429,13 +429,13 @@ interactions:
429 X-RateLimit-Limit: 429 X-RateLimit-Limit:
430 - '300' 430 - '300'
431 X-RateLimit-Remaining: 431 X-RateLimit-Remaining:
432 - '299' 432 - '292'
433 X-RateLimit-Reset: 433 X-RateLimit-Reset:
434 - '2022-11-17T21:00:00.736121Z' 434 - '2022-11-17T21:00:00.845464Z'
435 X-Request-Id: 435 X-Request-Id:
436 - 2b9fa644-dc09-489c-9381-eec41867cbe9 436 - 1b2f8591-6ff0-4d1e-8ac7-a2ac1f1fe25a
437 X-Runtime: 437 X-Runtime:
438 - '0.085861' 438 - '0.034573'
439 X-XSS-Protection: 439 X-XSS-Protection:
440 - 1; mode=block 440 - 1; mode=block
441 status: 441 status:
@@ -458,22 +458,30 @@ interactions:
458 uri: http://localhost:3000/api/v1/timelines/home 458 uri: http://localhost:3000/api/v1/timelines/home
459 response: 459 response:
460 body: 460 body:
461 string: '[{"id":"109360579914087110","created_at":"2022-11-17T18:33:40.663Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost:3000/users/mastodonpy_test/statuses/109360579914087110","url":"http://localhost:3000/@mastodonpy_test/109360579914087110","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"content":"\u003cp\u003eplease 461 string: '[{"id":"109360911667710470","created_at":"2022-11-17T19:58:02.822Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost:3000/users/mastodonpy_test/statuses/109360911667710470","url":"http://localhost:3000/@mastodonpy_test/109360911667710470","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"content":"\u003cp\u003eplease
462 ensure adequate headroom\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py
463 test suite","website":null},"account":{"id":"109337440686176140","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"John
464 Lennon","locked":true,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-13T00:00:00.000Z","note":"\u003cp\u003eI
465 walk funny\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/system/accounts/avatars/109/337/440/686/176/140/original/d6cd9a5a5e65da30.jpg","avatar_static":"http://localhost:3000/system/accounts/avatars/109/337/440/686/176/140/original/d6cd9a5a5e65da30.jpg","header":"http://localhost:3000/system/accounts/headers/109/337/440/686/176/140/original/2b7760a42692fbde.jpg","header_static":"http://localhost:3000/system/accounts/headers/109/337/440/686/176/140/original/2b7760a42692fbde.jpg","followers_count":0,"following_count":0,"statuses_count":6,"last_status_at":"2022-11-17","noindex":false,"emojis":[],"fields":[{"name":"bread","value":"toasty.","verified_at":null},{"name":"lasagna","value":"no!!!","verified_at":null}]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null},{"id":"109360904113799391","created_at":"2022-11-17T19:56:07.558Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost:3000/users/mastodonpy_test/statuses/109360904113799391","url":"http://localhost:3000/@mastodonpy_test/109360904113799391","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"content":"\u003cp\u003eplease
466 ensure adequate headroom\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py
467 test suite","website":null},"account":{"id":"109337440686176140","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"John
468 Lennon","locked":true,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-13T00:00:00.000Z","note":"\u003cp\u003eI
469 walk funny\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/system/accounts/avatars/109/337/440/686/176/140/original/d6cd9a5a5e65da30.jpg","avatar_static":"http://localhost:3000/system/accounts/avatars/109/337/440/686/176/140/original/d6cd9a5a5e65da30.jpg","header":"http://localhost:3000/system/accounts/headers/109/337/440/686/176/140/original/2b7760a42692fbde.jpg","header_static":"http://localhost:3000/system/accounts/headers/109/337/440/686/176/140/original/2b7760a42692fbde.jpg","followers_count":0,"following_count":0,"statuses_count":6,"last_status_at":"2022-11-17","noindex":false,"emojis":[],"fields":[{"name":"bread","value":"toasty.","verified_at":null},{"name":"lasagna","value":"no!!!","verified_at":null}]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null},{"id":"109360579914087110","created_at":"2022-11-17T18:33:40.663Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost:3000/users/mastodonpy_test/statuses/109360579914087110","url":"http://localhost:3000/@mastodonpy_test/109360579914087110","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"content":"\u003cp\u003eplease
462 ensure adequate headroom\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py 470 ensure adequate headroom\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py
463 test suite","website":null},"account":{"id":"109337440686176140","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"John 471 test suite","website":null},"account":{"id":"109337440686176140","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"John
464 Lennon","locked":true,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-13T00:00:00.000Z","note":"\u003cp\u003eI 472 Lennon","locked":true,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-13T00:00:00.000Z","note":"\u003cp\u003eI
465 walk funny\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/system/accounts/avatars/109/337/440/686/176/140/original/d6cd9a5a5e65da30.jpg","avatar_static":"http://localhost:3000/system/accounts/avatars/109/337/440/686/176/140/original/d6cd9a5a5e65da30.jpg","header":"http://localhost:3000/system/accounts/headers/109/337/440/686/176/140/original/2b7760a42692fbde.jpg","header_static":"http://localhost:3000/system/accounts/headers/109/337/440/686/176/140/original/2b7760a42692fbde.jpg","followers_count":0,"following_count":0,"statuses_count":4,"last_status_at":"2022-11-17","noindex":false,"emojis":[],"fields":[{"name":"bread","value":"toasty.","verified_at":null},{"name":"lasagna","value":"no!!!","verified_at":null}]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null},{"id":"109337450437842705","created_at":"2022-11-13T16:31:32.863Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost:3000/users/mastodonpy_test/statuses/109337450437842705","url":"http://localhost:3000/@mastodonpy_test/109337450437842705","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"content":"\u003cp\u003eit\u0026#39;s 473 walk funny\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/system/accounts/avatars/109/337/440/686/176/140/original/d6cd9a5a5e65da30.jpg","avatar_static":"http://localhost:3000/system/accounts/avatars/109/337/440/686/176/140/original/d6cd9a5a5e65da30.jpg","header":"http://localhost:3000/system/accounts/headers/109/337/440/686/176/140/original/2b7760a42692fbde.jpg","header_static":"http://localhost:3000/system/accounts/headers/109/337/440/686/176/140/original/2b7760a42692fbde.jpg","followers_count":0,"following_count":0,"statuses_count":6,"last_status_at":"2022-11-17","noindex":false,"emojis":[],"fields":[{"name":"bread","value":"toasty.","verified_at":null},{"name":"lasagna","value":"no!!!","verified_at":null}]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null},{"id":"109337450437842705","created_at":"2022-11-13T16:31:32.863Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost:3000/users/mastodonpy_test/statuses/109337450437842705","url":"http://localhost:3000/@mastodonpy_test/109337450437842705","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"content":"\u003cp\u003eit\u0026#39;s
466 cool guy\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py 474 cool guy\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py
467 test suite","website":null},"account":{"id":"109337440686176140","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"John 475 test suite","website":null},"account":{"id":"109337440686176140","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"John
468 Lennon","locked":true,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-13T00:00:00.000Z","note":"\u003cp\u003eI 476 Lennon","locked":true,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-13T00:00:00.000Z","note":"\u003cp\u003eI
469 walk funny\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/system/accounts/avatars/109/337/440/686/176/140/original/d6cd9a5a5e65da30.jpg","avatar_static":"http://localhost:3000/system/accounts/avatars/109/337/440/686/176/140/original/d6cd9a5a5e65da30.jpg","header":"http://localhost:3000/system/accounts/headers/109/337/440/686/176/140/original/2b7760a42692fbde.jpg","header_static":"http://localhost:3000/system/accounts/headers/109/337/440/686/176/140/original/2b7760a42692fbde.jpg","followers_count":0,"following_count":0,"statuses_count":4,"last_status_at":"2022-11-17","noindex":false,"emojis":[],"fields":[{"name":"bread","value":"toasty.","verified_at":null},{"name":"lasagna","value":"no!!!","verified_at":null}]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null}]' 477 walk funny\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/system/accounts/avatars/109/337/440/686/176/140/original/d6cd9a5a5e65da30.jpg","avatar_static":"http://localhost:3000/system/accounts/avatars/109/337/440/686/176/140/original/d6cd9a5a5e65da30.jpg","header":"http://localhost:3000/system/accounts/headers/109/337/440/686/176/140/original/2b7760a42692fbde.jpg","header_static":"http://localhost:3000/system/accounts/headers/109/337/440/686/176/140/original/2b7760a42692fbde.jpg","followers_count":0,"following_count":0,"statuses_count":6,"last_status_at":"2022-11-17","noindex":false,"emojis":[],"fields":[{"name":"bread","value":"toasty.","verified_at":null},{"name":"lasagna","value":"no!!!","verified_at":null}]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":null}]'
470 headers: 478 headers:
471 Cache-Control: 479 Cache-Control:
472 - no-store 480 - no-store
473 Content-Security-Policy: 481 Content-Security-Policy:
474 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src 482 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src
475 ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; 483 ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000;
476 style-src ''self'' http://localhost:3000 ''nonce-faRlQe20PGT5pFs0kdlAQg==''; 484 style-src ''self'' http://localhost:3000 ''nonce-HMi+VW9f5rE0rG5Dy5SF5Q=='';
477 media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' 485 media-src ''self'' https: data: http://localhost:3000; frame-src ''self''
478 https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' 486 https:; manifest-src ''self'' http://localhost:3000; connect-src ''self''
479 data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 487 data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000
@@ -483,10 +491,10 @@ interactions:
483 Content-Type: 491 Content-Type:
484 - application/json; charset=utf-8 492 - application/json; charset=utf-8
485 ETag: 493 ETag:
486 - W/"200de3a5f7d0d15a5a008600dee66fb6" 494 - W/"a4a8a28faa3eb838f93ff309d4642aa1"
487 Link: 495 Link:
488 - <http://localhost:3000/api/v1/timelines/home?max_id=109337450437842705>; rel="next", 496 - <http://localhost:3000/api/v1/timelines/home?max_id=109337450437842705>; rel="next",
489 <http://localhost:3000/api/v1/timelines/home?min_id=109360579914087110>; rel="prev" 497 <http://localhost:3000/api/v1/timelines/home?min_id=109360911667710470>; rel="prev"
490 Referrer-Policy: 498 Referrer-Policy:
491 - strict-origin-when-cross-origin 499 - strict-origin-when-cross-origin
492 Transfer-Encoding: 500 Transfer-Encoding:
@@ -502,9 +510,9 @@ interactions:
502 X-Permitted-Cross-Domain-Policies: 510 X-Permitted-Cross-Domain-Policies:
503 - none 511 - none
504 X-Request-Id: 512 X-Request-Id:
505 - 91f6a07e-a66d-4800-aaf2-79cbb7fc3486 513 - 5c53a97d-095f-4fbc-af8a-71d8d6147dc6
506 X-Runtime: 514 X-Runtime:
507 - '0.048140' 515 - '0.037492'
508 X-XSS-Protection: 516 X-XSS-Protection:
509 - 1; mode=block 517 - 1; mode=block
510 status: 518 status:
@@ -534,7 +542,7 @@ interactions:
534 Content-Security-Policy: 542 Content-Security-Policy:
535 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src 543 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src
536 ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; 544 ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000;
537 style-src ''self'' http://localhost:3000 ''nonce-QHs3ujVPRmUwAFyI/3XtxA==''; 545 style-src ''self'' http://localhost:3000 ''nonce-nfIWTN6yir29ewBAXPSIVg=='';
538 media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' 546 media-src ''self'' https: data: http://localhost:3000; frame-src ''self''
539 https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' 547 https:; manifest-src ''self'' http://localhost:3000; connect-src ''self''
540 data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 548 data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000
@@ -560,9 +568,9 @@ interactions:
560 X-Permitted-Cross-Domain-Policies: 568 X-Permitted-Cross-Domain-Policies:
561 - none 569 - none
562 X-Request-Id: 570 X-Request-Id:
563 - 3b1af585-179b-467a-9f0d-5d86b3399547 571 - 14c0b629-2a90-4f51-90cf-afebf89e3456
564 X-Runtime: 572 X-Runtime:
565 - '0.008452' 573 - '0.008067'
566 X-XSS-Protection: 574 X-XSS-Protection:
567 - 1; mode=block 575 - 1; mode=block
568 status: 576 status:
diff --git a/tests/cassettes/test_scheduled_status_datetimeobjects.pkl b/tests/cassettes/test_scheduled_status_datetimeobjects.pkl
new file mode 100644
index 0000000..ee0e5fc
--- /dev/null
+++ b/tests/cassettes/test_scheduled_status_datetimeobjects.pkl
Binary files differ
diff --git a/tests/test_status.py b/tests/test_status.py
index dff9812..7e30362 100644
--- a/tests/test_status.py
+++ b/tests/test_status.py
@@ -4,6 +4,8 @@ import datetime
4import pytz 4import pytz
5import vcr 5import vcr
6import time 6import time
7import pickle
8import os
7 9
8@pytest.mark.vcr() 10@pytest.mark.vcr()
9def test_status(status, api): 11def test_status(status, api):
@@ -171,8 +173,12 @@ def test_scheduled_status(api):
171 api.scheduled_status_delete(scheduled_toot_2) 173 api.scheduled_status_delete(scheduled_toot_2)
172 scheduled_toot_list_2 = api.scheduled_statuses() 174 scheduled_toot_list_2 = api.scheduled_statuses()
173 assert not scheduled_toot_2.id in map(lambda x: x.id, scheduled_toot_list_2) 175 assert not scheduled_toot_2.id in map(lambda x: x.id, scheduled_toot_list_2)
174 176
175 the_very_immediate_future = datetime.datetime.now() + datetime.timedelta(seconds=5) 177 if os.path.exists("tests/cassettes/test_scheduled_status_datetimeobjects.pkl"):
178 the_very_immediate_future = pickle.load(open("tests/cassettes/test_scheduled_status_datetimeobjects.pkl", 'rb'))
179 else:
180 the_very_immediate_future = datetime.datetime.now() + datetime.timedelta(seconds=5)
181 pickle.dump(the_very_immediate_future, open("tests/cassettes/test_scheduled_status_datetimeobjects.pkl", 'wb'))
176 scheduled_toot_4 = api.status_post("please ensure adequate headroom", scheduled_at=the_very_immediate_future) 182 scheduled_toot_4 = api.status_post("please ensure adequate headroom", scheduled_at=the_very_immediate_future)
177 time.sleep(15) 183 time.sleep(15)
178 statuses = api.timeline_home() 184 statuses = api.timeline_home()
diff --git a/tests/test_timeline.py b/tests/test_timeline.py
index fbeae8e..9d63025 100644
--- a/tests/test_timeline.py
+++ b/tests/test_timeline.py
@@ -2,6 +2,8 @@ import pytest
2import time 2import time
3from mastodon.Mastodon import MastodonAPIError, MastodonIllegalArgumentError, MastodonUnauthorizedError 3from mastodon.Mastodon import MastodonAPIError, MastodonIllegalArgumentError, MastodonUnauthorizedError
4import datetime 4import datetime
5import pickle
6import os
5 7
6@pytest.mark.vcr() 8@pytest.mark.vcr()
7def test_public_tl_anonymous(api_anonymous, status3): 9def test_public_tl_anonymous(api_anonymous, status3):
@@ -78,9 +80,13 @@ def test_min_max_id(api, status):
78 80
79@pytest.mark.vcr() 81@pytest.mark.vcr()
80def test_min_max_id_datetimes(api, status): 82def test_min_max_id_datetimes(api, status):
81 the_past = datetime.datetime.now() - datetime.timedelta(seconds=20) 83 if os.path.exists("tests/cassettes/test_min_max_id_datetimes_datetimeobjects.pkl"):
82 the_future = datetime.datetime.now() + datetime.timedelta(seconds=20) 84 the_past, the_future, the_far_future = pickle.load(open("tests/cassettes/test_min_max_id_datetimes_datetimeobjects.pkl", 'rb'))
83 the_far_future = datetime.datetime.now() + datetime.timedelta(seconds=40) 85 else:
86 the_past = datetime.datetime.now() - datetime.timedelta(seconds=20)
87 the_future = datetime.datetime.now() + datetime.timedelta(seconds=20)
88 the_far_future = datetime.datetime.now() + datetime.timedelta(seconds=40)
89 pickle.dump((the_past, the_future, the_far_future), open("tests/cassettes/test_min_max_id_datetimes_datetimeobjects.pkl", 'wb'))
84 90
85 time.sleep(3) 91 time.sleep(3)
86 tl = api.timeline_home(min_id = the_past, max_id = the_future) 92 tl = api.timeline_home(min_id = the_past, max_id = the_future)
Powered by cgit v1.2.3 (git 2.41.0)