aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorhalcy <halcy@ARARAGI-KUN>2022-11-17 23:51:40 +0200
committerhalcy <halcy@ARARAGI-KUN>2022-11-17 23:51:40 +0200
commitc35104748dac99ee4777cfa057c1afa65ed2a117 (patch)
treecfe1a838a8a98f004164b2d3ef0cce1c8cf56142 /tests
parent897b3a23cf4177675f0769de68f08ad8c4faf335 (diff)
downloadmastodon.py-c35104748dac99ee4777cfa057c1afa65ed2a117.tar.gz
maybe fix tests
Diffstat (limited to 'tests')
-rw-r--r--tests/cassettes/test_min_max_id_datetimes.yaml50
-rw-r--r--tests/cassettes/test_min_max_id_datetimes_datetimeobjects.pklbin93 -> 136 bytes
-rw-r--r--tests/test_timeline.py11
3 files changed, 34 insertions, 27 deletions
diff --git a/tests/cassettes/test_min_max_id_datetimes.yaml b/tests/cassettes/test_min_max_id_datetimes.yaml
index 7b5a274..082d50c 100644
--- a/tests/cassettes/test_min_max_id_datetimes.yaml
+++ b/tests/cassettes/test_min_max_id_datetimes.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":"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 23 string: '{"id":"109361356928932952","created_at":"2022-11-17T21:51:16.968Z","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/109361356928932952","url":"http://localhost:3000/@mastodonpy_test/109361356928932952","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":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}' 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}'
@@ -30,7 +30,7 @@ interactions:
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-eu9ApZVeWmOtnW3cjhpGVg==''; 33 style-src ''self'' http://localhost:3000 ''nonce-Wze0VHokLwYZzGZsh21BIg=='';
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/"1b1f51ff5c8829fe893b287e7435a814" 43 - W/"e61d0e228d8657f6ccd5c18304a4f1c7"
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 - '291' 61 - '299'
62 X-RateLimit-Reset: 62 X-RateLimit-Reset:
63 - '2022-11-17T21:00:00.931702Z' 63 - '2022-11-18T00:00:00.990213Z'
64 X-Request-Id: 64 X-Request-Id:
65 - 1d7fbb0b-3d84-4da4-8fd1-1a8eb47e6bdd 65 - 75f26554-cf0a-478e-a28d-aa07fe7699c1
66 X-Runtime: 66 X-Runtime:
67 - '0.037621' 67 - '0.040252'
68 X-XSS-Protection: 68 X-XSS-Protection:
69 - 1; mode=block 69 - 1; mode=block
70 status: 70 status:
@@ -84,10 +84,10 @@ 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=109360921640960000&min_id=109360919019520000 87 uri: http://localhost:3000/api/v1/timelines/home?max_id=109361358176256000&min_id=109361355554816000
88 response: 88 response:
89 body: 89 body:
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 90 string: '[{"id":"109361356928932952","created_at":"2022-11-17T21:51:16.968Z","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/109361356928932952","url":"http://localhost:3000/@mastodonpy_test/109361356928932952","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":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}]' 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}]'
@@ -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-BVkzXWWXoczXLIl9nwSoWw==''; 100 style-src ''self'' http://localhost:3000 ''nonce-/U4/IBa1u7/14h9/kkCoPA=='';
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/"a0a4a89f2613e8efe1b7ff788d6a56f5" 110 - W/"68fd8fd0bc8b32aea5450a1f00072741"
111 Link: 111 Link:
112 - <http://localhost:3000/api/v1/timelines/home?max_id=109360920389596939>; rel="next", 112 - <http://localhost:3000/api/v1/timelines/home?max_id=109361356928932952>; rel="next",
113 <http://localhost:3000/api/v1/timelines/home?min_id=109360920389596939>; rel="prev" 113 <http://localhost:3000/api/v1/timelines/home?min_id=109361356928932952>; 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 - f9e7cc0b-47e5-4b02-9da2-fc41574a8d2a 129 - 5aecbb98-aa41-42ef-819a-9a7194fbb91a
130 X-Runtime: 130 X-Runtime:
131 - '0.021379' 131 - '0.022338'
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=109360922951680000&min_id=109360921640960000 151 uri: http://localhost:3000/api/v1/timelines/home?max_id=109361359486976000&min_id=109361358176256000
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-pzcUQhXaLhmCAXOMbYOrTg==''; 161 style-src ''self'' http://localhost:3000 ''nonce-9y78d6yOrkrcKX9mQp3WTw=='';
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 - 01914c1c-b360-461d-a68e-e7b0bc156447 187 - d4f8db1a-03c9-44a4-89dd-ef0159e4a00f
188 X-Runtime: 188 X-Runtime:
189 - '0.008764' 189 - '0.009579'
190 X-XSS-Protection: 190 X-XSS-Protection:
191 - 1; mode=block 191 - 1; mode=block
192 status: 192 status:
@@ -208,10 +208,10 @@ 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/109360920389596939 211 uri: http://localhost:3000/api/v1/statuses/109361356928932952
212 response: 212 response:
213 body: 213 body:
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 214 string: '{"id":"109361356928932952","created_at":"2022-11-17T21:51:16.968Z","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/109361356928932952","url":"http://localhost:3000/@mastodonpy_test/109361356928932952","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":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}' 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}'
@@ -221,7 +221,7 @@ interactions:
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-JQ6J37EfMdjQbrYXpw7SOw==''; 224 style-src ''self'' http://localhost:3000 ''nonce-5wpK9zpFeDxFYga8QqVhrA=='';
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/"1ae721011c6bf203187d567b52a82145" 234 - W/"6cdc52fd88e914cc490d0db147b2cccd"
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 - f82b9cd7-463b-4142-9034-ba19dfb323d0 250 - d0c1d221-b16a-45c3-8ba1-789444b14b96
251 X-Runtime: 251 X-Runtime:
252 - '0.023947' 252 - '0.026318'
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
index dbcbed1..58569a2 100644
--- a/tests/cassettes/test_min_max_id_datetimes_datetimeobjects.pkl
+++ b/tests/cassettes/test_min_max_id_datetimes_datetimeobjects.pkl
Binary files differ
diff --git a/tests/test_timeline.py b/tests/test_timeline.py
index 9d63025..85026f6 100644
--- a/tests/test_timeline.py
+++ b/tests/test_timeline.py
@@ -81,12 +81,19 @@ def test_min_max_id(api, status):
81@pytest.mark.vcr() 81@pytest.mark.vcr()
82def test_min_max_id_datetimes(api, status): 82def test_min_max_id_datetimes(api, status):
83 if os.path.exists("tests/cassettes/test_min_max_id_datetimes_datetimeobjects.pkl"): 83 if os.path.exists("tests/cassettes/test_min_max_id_datetimes_datetimeobjects.pkl"):
84 the_past, the_future, the_far_future = pickle.load(open("tests/cassettes/test_min_max_id_datetimes_datetimeobjects.pkl", 'rb')) 84 data_dict = pickle.load(open("tests/cassettes/test_min_max_id_datetimes_datetimeobjects.pkl", 'rb'))
85 the_past = data_dict["the_past"]
86 the_future = data_dict["the_future"]
87 the_far_future = data_dict["the_far_future"]
85 else: 88 else:
86 the_past = datetime.datetime.now() - datetime.timedelta(seconds=20) 89 the_past = datetime.datetime.now() - datetime.timedelta(seconds=20)
87 the_future = datetime.datetime.now() + datetime.timedelta(seconds=20) 90 the_future = datetime.datetime.now() + datetime.timedelta(seconds=20)
88 the_far_future = datetime.datetime.now() + datetime.timedelta(seconds=40) 91 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')) 92 pickle.dump({
93 "the_past": the_past,
94 "the_future": the_future,
95 "the_far_future": the_far_future,
96 }, open("tests/cassettes/test_min_max_id_datetimes_datetimeobjects.pkl", 'wb'))
90 97
91 time.sleep(3) 98 time.sleep(3)
92 tl = api.timeline_home(min_id = the_past, max_id = the_future) 99 tl = api.timeline_home(min_id = the_past, max_id = the_future)
Powered by cgit v1.2.3 (git 2.41.0)