From 725f79466de65743df0c3498a1bb08e106b5209e Mon Sep 17 00:00:00 2001 From: halcy Date: Thu, 17 Nov 2022 22:00:37 +0200 Subject: Fix tests --- tests/cassettes/test_min_max_id_datetimes.yaml | 56 +++++------ .../test_min_max_id_datetimes_datetimeobjects.pkl | Bin 0 -> 93 bytes tests/cassettes/test_scheduled_status.yaml | 112 +++++++++++---------- .../test_scheduled_status_datetimeobjects.pkl | Bin 0 -> 53 bytes 4 files changed, 88 insertions(+), 80 deletions(-) create mode 100644 tests/cassettes/test_min_max_id_datetimes_datetimeobjects.pkl create mode 100644 tests/cassettes/test_scheduled_status_datetimeobjects.pkl (limited to 'tests/cassettes') 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: uri: http://localhost:3000/api/v1/statuses response: body: - 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 + 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 test suite","website":null},"account":{"id":"109337440686176140","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"John Lennon","locked":true,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-13T00:00:00.000Z","note":"\u003cp\u003eI - 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}' + 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}' headers: Cache-Control: - no-store Content-Security-Policy: - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; - style-src ''self'' http://localhost:3000 ''nonce-GNnrTSvg1wDIabQ3kjtGyQ==''; + style-src ''self'' http://localhost:3000 ''nonce-eu9ApZVeWmOtnW3cjhpGVg==''; media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 @@ -40,7 +40,7 @@ interactions: Content-Type: - application/json; charset=utf-8 ETag: - - W/"58511b0f15d0c3ac192c75655d58aca2" + - W/"1b1f51ff5c8829fe893b287e7435a814" Referrer-Policy: - strict-origin-when-cross-origin Transfer-Encoding: @@ -58,13 +58,13 @@ interactions: X-RateLimit-Limit: - '300' X-RateLimit-Remaining: - - '294' + - '291' X-RateLimit-Reset: - - '2022-11-17T21:00:00.626208Z' + - '2022-11-17T21:00:00.931702Z' X-Request-Id: - - 07b95dd9-1b8c-403d-84d7-9086e3d1f875 + - 1d7fbb0b-3d84-4da4-8fd1-1a8eb47e6bdd X-Runtime: - - '0.103956' + - '0.037621' X-XSS-Protection: - 1; mode=block status: @@ -84,20 +84,20 @@ interactions: User-Agent: - tests/v311 method: GET - uri: http://localhost:3000/api/v1/timelines/home?max_id=109360645734400000&min_id=109360643112960000 + uri: http://localhost:3000/api/v1/timelines/home?max_id=109360921640960000&min_id=109360919019520000 response: body: - 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 + 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 test suite","website":null},"account":{"id":"109337440686176140","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"John Lennon","locked":true,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-13T00:00:00.000Z","note":"\u003cp\u003eI - 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}]' + 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}]' headers: Cache-Control: - no-store Content-Security-Policy: - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; - style-src ''self'' http://localhost:3000 ''nonce-S6/DmjeVOHI/8no8CZqoEA==''; + style-src ''self'' http://localhost:3000 ''nonce-BVkzXWWXoczXLIl9nwSoWw==''; media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 @@ -107,10 +107,10 @@ interactions: Content-Type: - application/json; charset=utf-8 ETag: - - W/"86a06105a5e70f233a95eea2721f69ee" + - W/"a0a4a89f2613e8efe1b7ff788d6a56f5" Link: - - ; rel="next", - ; rel="prev" + - ; rel="next", + ; rel="prev" Referrer-Policy: - strict-origin-when-cross-origin Transfer-Encoding: @@ -126,9 +126,9 @@ interactions: X-Permitted-Cross-Domain-Policies: - none X-Request-Id: - - 738b28f0-169a-49b8-89bf-97dfc60608c8 + - f9e7cc0b-47e5-4b02-9da2-fc41574a8d2a X-Runtime: - - '0.029525' + - '0.021379' X-XSS-Protection: - 1; mode=block status: @@ -148,7 +148,7 @@ interactions: User-Agent: - tests/v311 method: GET - uri: http://localhost:3000/api/v1/timelines/home?max_id=109360647045120000&min_id=109360645734400000 + uri: http://localhost:3000/api/v1/timelines/home?max_id=109360922951680000&min_id=109360921640960000 response: body: string: '[]' @@ -158,7 +158,7 @@ interactions: Content-Security-Policy: - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; - style-src ''self'' http://localhost:3000 ''nonce-V/vKOm6+nPmC5SpFFwp80w==''; + style-src ''self'' http://localhost:3000 ''nonce-pzcUQhXaLhmCAXOMbYOrTg==''; media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 @@ -184,9 +184,9 @@ interactions: X-Permitted-Cross-Domain-Policies: - none X-Request-Id: - - e7c84272-bb28-42ca-a59e-cce7539844ad + - 01914c1c-b360-461d-a68e-e7b0bc156447 X-Runtime: - - '0.009517' + - '0.008764' X-XSS-Protection: - 1; mode=block status: @@ -208,20 +208,20 @@ interactions: User-Agent: - tests/v311 method: DELETE - uri: http://localhost:3000/api/v1/statuses/109360644459818976 + uri: http://localhost:3000/api/v1/statuses/109360920389596939 response: body: - 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 + 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 test suite","website":null},"account":{"id":"109337440686176140","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"John Lennon","locked":true,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-13T00:00:00.000Z","note":"\u003cp\u003eI - 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}' + 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}' headers: Cache-Control: - no-store Content-Security-Policy: - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; - style-src ''self'' http://localhost:3000 ''nonce-+b0YxTzjfZxXGiiUjfZehw==''; + style-src ''self'' http://localhost:3000 ''nonce-JQ6J37EfMdjQbrYXpw7SOw==''; media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 @@ -231,7 +231,7 @@ interactions: Content-Type: - application/json; charset=utf-8 ETag: - - W/"02008e45c6ebce96f6e4e9ec2354008b" + - W/"1ae721011c6bf203187d567b52a82145" Referrer-Policy: - strict-origin-when-cross-origin Transfer-Encoding: @@ -247,9 +247,9 @@ interactions: X-Permitted-Cross-Domain-Policies: - none X-Request-Id: - - 0eed8861-4f33-4cbc-85c4-cc45f270a344 + - f82b9cd7-463b-4142-9034-ba19dfb323d0 X-Runtime: - - '0.036224' + - '0.023947' X-XSS-Protection: - 1; mode=block 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 Binary files /dev/null and b/tests/cassettes/test_min_max_id_datetimes_datetimeobjects.pkl 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: uri: http://localhost:3000/api/v1/statuses response: body: - string: '{"id":"3","scheduled_at":"4000-01-01T14:33:14.000Z","params":{"text":"please + string: '{"id":"8","scheduled_at":"4000-01-01T14:33:14.000Z","params":{"text":"please 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":[]}' headers: Cache-Control: @@ -28,7 +28,7 @@ interactions: Content-Security-Policy: - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; - style-src ''self'' http://localhost:3000 ''nonce-8MI0hLsUyrzDc4kIn3QyMg==''; + style-src ''self'' http://localhost:3000 ''nonce-Ak/w6f2hbeF+tQDO2xwBNw==''; media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 @@ -38,7 +38,7 @@ interactions: Content-Type: - application/json; charset=utf-8 ETag: - - W/"e650d49830a41555fedcb7fb33b1142c" + - W/"1d6abb8ae5a6f0287532a204b61c688f" Referrer-Policy: - strict-origin-when-cross-origin Transfer-Encoding: @@ -56,13 +56,13 @@ interactions: X-RateLimit-Limit: - '300' X-RateLimit-Remaining: - - '300' + - '293' X-RateLimit-Reset: - - '2022-11-17T21:00:00.569037Z' + - '2022-11-17T21:00:00.743922Z' X-Request-Id: - - 1f7204a9-6c93-444a-bc27-87fd8949027e + - 5e367318-8905-42f7-8b03-dfefef0b8544 X-Runtime: - - '0.229002' + - '0.025933' X-XSS-Protection: - 1; mode=block status: @@ -86,10 +86,10 @@ interactions: User-Agent: - tests/v311 method: PUT - uri: http://localhost:3000/api/v1/scheduled_statuses/3 + uri: http://localhost:3000/api/v1/scheduled_statuses/8 response: body: - string: '{"id":"3","scheduled_at":"4000-01-01T14:23:14.000Z","params":{"poll":null,"text":"please + string: '{"id":"8","scheduled_at":"4000-01-01T14:23:14.000Z","params":{"poll":null,"text":"please 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":[]}' headers: Cache-Control: @@ -97,7 +97,7 @@ interactions: Content-Security-Policy: - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; - style-src ''self'' http://localhost:3000 ''nonce-dqsjmaaupc42lzB9CQahdw==''; + style-src ''self'' http://localhost:3000 ''nonce-stvmuoKpti0sNxM89xxgZA==''; media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 @@ -107,7 +107,7 @@ interactions: Content-Type: - application/json; charset=utf-8 ETag: - - W/"c23cf5fde7455d325c6b924266e2e877" + - W/"ef1f9f079ab2e1fc61e245067021a431" Referrer-Policy: - strict-origin-when-cross-origin Transfer-Encoding: @@ -123,9 +123,9 @@ interactions: X-Permitted-Cross-Domain-Policies: - none X-Request-Id: - - 45459a5d-1994-4eeb-8551-f1df97d9530b + - dcf2a73e-2c68-46d3-ad9d-691a830db5e1 X-Runtime: - - '0.016216' + - '0.012105' X-XSS-Protection: - 1; mode=block status: @@ -148,7 +148,7 @@ interactions: uri: http://localhost:3000/api/v1/scheduled_statuses response: body: - string: '[{"id":"3","scheduled_at":"4000-01-01T14:23:14.000Z","params":{"poll":null,"text":"please + string: '[{"id":"8","scheduled_at":"4000-01-01T14:23:14.000Z","params":{"poll":null,"text":"please 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":[]}]' headers: Cache-Control: @@ -156,7 +156,7 @@ interactions: Content-Security-Policy: - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; - style-src ''self'' http://localhost:3000 ''nonce-ogS9JdJ7yVcKGhdGJ4ohvQ==''; + style-src ''self'' http://localhost:3000 ''nonce-uZuwulirf3GB1inWQ/FEBw==''; media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 @@ -166,9 +166,9 @@ interactions: Content-Type: - application/json; charset=utf-8 ETag: - - W/"4695a11bc3761f561fbe599c1fa67707" + - W/"53412585062018a03512cca034ff85d4" Link: - - ; rel="prev" + - ; rel="prev" Referrer-Policy: - strict-origin-when-cross-origin Transfer-Encoding: @@ -184,9 +184,9 @@ interactions: X-Permitted-Cross-Domain-Policies: - none X-Request-Id: - - 05eec4ca-e7d5-4329-a6e2-d2c55ec462a7 + - 4eab30ef-c087-4026-bcc5-22a0d80d5426 X-Runtime: - - '0.009847' + - '0.007217' X-XSS-Protection: - 1; mode=block status: @@ -206,10 +206,10 @@ interactions: User-Agent: - tests/v311 method: GET - uri: http://localhost:3000/api/v1/scheduled_statuses/3 + uri: http://localhost:3000/api/v1/scheduled_statuses/8 response: body: - string: '{"id":"3","scheduled_at":"4000-01-01T14:23:14.000Z","params":{"poll":null,"text":"please + string: '{"id":"8","scheduled_at":"4000-01-01T14:23:14.000Z","params":{"poll":null,"text":"please 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":[]}' headers: Cache-Control: @@ -217,7 +217,7 @@ interactions: Content-Security-Policy: - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; - style-src ''self'' http://localhost:3000 ''nonce-101mCoCwPrjnwSQ1RVvVkw==''; + style-src ''self'' http://localhost:3000 ''nonce-sDG/INd5trVXh399MBMRLg==''; media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 @@ -227,7 +227,7 @@ interactions: Content-Type: - application/json; charset=utf-8 ETag: - - W/"c23cf5fde7455d325c6b924266e2e877" + - W/"ef1f9f079ab2e1fc61e245067021a431" Referrer-Policy: - strict-origin-when-cross-origin Transfer-Encoding: @@ -243,9 +243,9 @@ interactions: X-Permitted-Cross-Domain-Policies: - none X-Request-Id: - - 7ae5d245-26f5-4169-ad0a-5857f2ae1e26 + - 59c54621-0e4e-49e4-a78b-95bbedc22370 X-Runtime: - - '0.008526' + - '0.006789' X-XSS-Protection: - 1; mode=block status: @@ -267,7 +267,7 @@ interactions: User-Agent: - tests/v311 method: DELETE - uri: http://localhost:3000/api/v1/scheduled_statuses/3 + uri: http://localhost:3000/api/v1/scheduled_statuses/8 response: body: string: '{}' @@ -277,7 +277,7 @@ interactions: Content-Security-Policy: - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; - style-src ''self'' http://localhost:3000 ''nonce-vq3gSI3BXir3TR5GiD2HRA==''; + style-src ''self'' http://localhost:3000 ''nonce-MxIQ3EKn0B1lCGfXe6p4Gg==''; media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 @@ -303,9 +303,9 @@ interactions: X-Permitted-Cross-Domain-Policies: - none X-Request-Id: - - 43ad9ed4-979f-4fcd-8de1-a08017bf5101 + - 47d7f0c0-e174-42f2-8506-86942fc5ebbf X-Runtime: - - '0.012787' + - '0.010192' X-XSS-Protection: - 1; mode=block status: @@ -335,7 +335,7 @@ interactions: Content-Security-Policy: - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; - style-src ''self'' http://localhost:3000 ''nonce-iUJq9NaSxMW8Tl46vhzO0g==''; + style-src ''self'' http://localhost:3000 ''nonce-vDFRE2ovp6xbVtXBXalZVw==''; media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 @@ -361,16 +361,16 @@ interactions: X-Permitted-Cross-Domain-Policies: - none X-Request-Id: - - a280af2d-3f06-43e5-a7fd-81ee15ba423d + - c0a893ff-dde3-4bb4-ab03-8f4c70f26f22 X-Runtime: - - '0.007606' + - '0.007906' X-XSS-Protection: - 1; mode=block status: code: 200 message: OK - request: - body: status=please+ensure+adequate+headroom&scheduled_at=2022-11-17T18%3A33%3A45%2B00%3A00 + body: status=please+ensure+adequate+headroom&scheduled_at=2022-11-17T19%3A58%3A07%2B00%3A00 headers: Accept: - '*/*' @@ -390,18 +390,18 @@ interactions: uri: http://localhost:3000/api/v1/statuses response: body: - 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 + 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 ensure adequate headroom\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py test suite","website":null},"account":{"id":"109337440686176140","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"John Lennon","locked":true,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-13T00:00:00.000Z","note":"\u003cp\u003eI - 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}' + 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}' headers: Cache-Control: - no-store Content-Security-Policy: - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; - style-src ''self'' http://localhost:3000 ''nonce-2aLo0w9hlVj9xfPOBdEXsg==''; + style-src ''self'' http://localhost:3000 ''nonce-8OI7FZj2LTcg0sMTtFIKsQ==''; media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 @@ -411,7 +411,7 @@ interactions: Content-Type: - application/json; charset=utf-8 ETag: - - W/"fb00e7f8059ab81e322aa084d8875cb9" + - W/"3a893eeef2d4aae154d54e233344b05b" Referrer-Policy: - strict-origin-when-cross-origin Transfer-Encoding: @@ -429,13 +429,13 @@ interactions: X-RateLimit-Limit: - '300' X-RateLimit-Remaining: - - '299' + - '292' X-RateLimit-Reset: - - '2022-11-17T21:00:00.736121Z' + - '2022-11-17T21:00:00.845464Z' X-Request-Id: - - 2b9fa644-dc09-489c-9381-eec41867cbe9 + - 1b2f8591-6ff0-4d1e-8ac7-a2ac1f1fe25a X-Runtime: - - '0.085861' + - '0.034573' X-XSS-Protection: - 1; mode=block status: @@ -458,22 +458,30 @@ interactions: uri: http://localhost:3000/api/v1/timelines/home response: body: - 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 + 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 + ensure adequate headroom\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py + test suite","website":null},"account":{"id":"109337440686176140","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"John + Lennon","locked":true,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-13T00:00:00.000Z","note":"\u003cp\u003eI + 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 + ensure adequate headroom\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py + test suite","website":null},"account":{"id":"109337440686176140","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"John + Lennon","locked":true,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-13T00:00:00.000Z","note":"\u003cp\u003eI + 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 ensure adequate headroom\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py test suite","website":null},"account":{"id":"109337440686176140","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"John Lennon","locked":true,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-13T00:00:00.000Z","note":"\u003cp\u003eI - 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 + 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 cool guy\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py test suite","website":null},"account":{"id":"109337440686176140","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"John Lennon","locked":true,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-13T00:00:00.000Z","note":"\u003cp\u003eI - 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}]' + 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}]' headers: Cache-Control: - no-store Content-Security-Policy: - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; - style-src ''self'' http://localhost:3000 ''nonce-faRlQe20PGT5pFs0kdlAQg==''; + style-src ''self'' http://localhost:3000 ''nonce-HMi+VW9f5rE0rG5Dy5SF5Q==''; media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 @@ -483,10 +491,10 @@ interactions: Content-Type: - application/json; charset=utf-8 ETag: - - W/"200de3a5f7d0d15a5a008600dee66fb6" + - W/"a4a8a28faa3eb838f93ff309d4642aa1" Link: - ; rel="next", - ; rel="prev" + ; rel="prev" Referrer-Policy: - strict-origin-when-cross-origin Transfer-Encoding: @@ -502,9 +510,9 @@ interactions: X-Permitted-Cross-Domain-Policies: - none X-Request-Id: - - 91f6a07e-a66d-4800-aaf2-79cbb7fc3486 + - 5c53a97d-095f-4fbc-af8a-71d8d6147dc6 X-Runtime: - - '0.048140' + - '0.037492' X-XSS-Protection: - 1; mode=block status: @@ -534,7 +542,7 @@ interactions: Content-Security-Policy: - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; - style-src ''self'' http://localhost:3000 ''nonce-QHs3ujVPRmUwAFyI/3XtxA==''; + style-src ''self'' http://localhost:3000 ''nonce-nfIWTN6yir29ewBAXPSIVg==''; media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 @@ -560,9 +568,9 @@ interactions: X-Permitted-Cross-Domain-Policies: - none X-Request-Id: - - 3b1af585-179b-467a-9f0d-5d86b3399547 + - 14c0b629-2a90-4f51-90cf-afebf89e3456 X-Runtime: - - '0.008452' + - '0.008067' X-XSS-Protection: - 1; mode=block 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 Binary files /dev/null and b/tests/cassettes/test_scheduled_status_datetimeobjects.pkl differ -- cgit v1.2.3