From b1e1ec7bdc9e84ecd31626f1a4fbf645e84d0bb2 Mon Sep 17 00:00:00 2001 From: halcy Date: Sun, 13 Nov 2022 15:33:10 +0200 Subject: Add support for timed mutes, fix tests to actually pass with new setup --- tests/cassettes/test_report.yaml | 76 ++++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 38 deletions(-) (limited to 'tests/cassettes/test_report.yaml') diff --git a/tests/cassettes/test_report.yaml b/tests/cassettes/test_report.yaml index 3c9929a..961989e 100644 --- a/tests/cassettes/test_report.yaml +++ b/tests/cassettes/test_report.yaml @@ -20,17 +20,17 @@ interactions: uri: http://localhost:3000/api/v1/statuses response: body: - string: '{"id":"109304276308745948","created_at":"2022-11-07T19:54:55.825Z","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/109304276308745948","url":"http://localhost:3000/@mastodonpy_test/109304276308745948","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":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"John - Lennon","locked":true,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-07T00:00:00.000Z","note":"\u003cp\u003eI - walk funny\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/system/accounts/avatars/123/456/789/012/345/original/2d5ad2a2a4ca9e32.jpg","avatar_static":"http://localhost:3000/system/accounts/avatars/123/456/789/012/345/original/2d5ad2a2a4ca9e32.jpg","header":"http://localhost:3000/system/accounts/headers/123/456/789/012/345/original/51bc27ef4d67326e.jpg","header_static":"http://localhost:3000/system/accounts/headers/123/456/789/012/345/original/51bc27ef4d67326e.jpg","followers_count":0,"following_count":0,"statuses_count":11,"last_status_at":"2022-11-07","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}' + string: '{"id":"109336679805186973","created_at":"2022-11-13T13:15:33.943Z","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/109336679805186973","url":"http://localhost:3000/@mastodonpy_test/109336679805186973","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":"109336623311102204","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/336/623/311/102/204/original/8f758332953652da.jpg","avatar_static":"http://localhost:3000/system/accounts/avatars/109/336/623/311/102/204/original/8f758332953652da.jpg","header":"http://localhost:3000/system/accounts/headers/109/336/623/311/102/204/original/c7470bf076df1e55.jpg","header_static":"http://localhost:3000/system/accounts/headers/109/336/623/311/102/204/original/c7470bf076df1e55.jpg","followers_count":0,"following_count":0,"statuses_count":19,"last_status_at":"2022-11-13","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-vANrukuRcocR74nNspeKGA==''; + style-src ''self'' http://localhost:3000 ''nonce-VKFCwmqz9qGJtIb67odrFg==''; 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/"0e91062a90c0cf84e3ec0088303be341" + - W/"05a8becbb1436960b65d9ed0d1bfe29e" Referrer-Policy: - strict-origin-when-cross-origin Transfer-Encoding: @@ -58,13 +58,13 @@ interactions: X-RateLimit-Limit: - '300' X-RateLimit-Remaining: - - '224' + - '223' X-RateLimit-Reset: - - '2022-11-07T21:00:00.847327Z' + - '2022-11-13T15:00:00.964443Z' X-Request-Id: - - 8f0dfa46-85b8-4454-8151-e78a3b1b0812 + - c48f6259-031a-44e6-9d87-418f4ab3ef8f X-Runtime: - - '0.036024' + - '0.034672' X-XSS-Protection: - 1; mode=block status: @@ -87,17 +87,17 @@ interactions: uri: http://localhost:3000/api/v1/accounts/verify_credentials response: body: - string: '{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"John - Lennon","locked":true,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-07T00:00:00.000Z","note":"\u003cp\u003eI - walk funny\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/system/accounts/avatars/123/456/789/012/345/original/2d5ad2a2a4ca9e32.jpg","avatar_static":"http://localhost:3000/system/accounts/avatars/123/456/789/012/345/original/2d5ad2a2a4ca9e32.jpg","header":"http://localhost:3000/system/accounts/headers/123/456/789/012/345/original/51bc27ef4d67326e.jpg","header_static":"http://localhost:3000/system/accounts/headers/123/456/789/012/345/original/51bc27ef4d67326e.jpg","followers_count":0,"following_count":0,"statuses_count":11,"last_status_at":"2022-11-07","noindex":false,"source":{"privacy":"public","sensitive":false,"language":null,"note":"I - walk funny","fields":[{"name":"bread","value":"toasty.","verified_at":null},{"name":"lasagna","value":"no!!!","verified_at":null}],"follow_requests_count":1},"emojis":[],"fields":[{"name":"bread","value":"toasty.","verified_at":null},{"name":"lasagna","value":"no!!!","verified_at":null}],"role":{"id":"-99","name":"","permissions":"65536","color":"","highlighted":false}}' + string: '{"id":"109336623311102204","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/336/623/311/102/204/original/8f758332953652da.jpg","avatar_static":"http://localhost:3000/system/accounts/avatars/109/336/623/311/102/204/original/8f758332953652da.jpg","header":"http://localhost:3000/system/accounts/headers/109/336/623/311/102/204/original/c7470bf076df1e55.jpg","header_static":"http://localhost:3000/system/accounts/headers/109/336/623/311/102/204/original/c7470bf076df1e55.jpg","followers_count":0,"following_count":0,"statuses_count":18,"last_status_at":"2022-11-13","noindex":false,"source":{"privacy":"public","sensitive":false,"language":null,"note":"I + walk funny","fields":[{"name":"bread","value":"toasty.","verified_at":null},{"name":"lasagna","value":"no!!!","verified_at":null}],"follow_requests_count":0},"emojis":[],"fields":[{"name":"bread","value":"toasty.","verified_at":null},{"name":"lasagna","value":"no!!!","verified_at":null}],"role":{"id":"-99","name":"","permissions":"65536","color":"","highlighted":false}}' 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-j4PQ4m420GcHOQUhVG9W0g==''; + style-src ''self'' http://localhost:3000 ''nonce-aHncQ7SVAj1RAQLTQakmSA==''; 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/"b5332dd05d21c9a70f5eb39ff819ab43" + - W/"e8fb3fcdb1b5d99e2397b075c280daaf" Referrer-Policy: - strict-origin-when-cross-origin Transfer-Encoding: @@ -123,16 +123,16 @@ interactions: X-Permitted-Cross-Domain-Policies: - none X-Request-Id: - - 4f4c7509-d3f6-49a9-933d-abb36b66093e + - ee220d05-4e7b-4ddc-a50d-eab44083aec1 X-Runtime: - - '0.012947' + - '0.012227' X-XSS-Protection: - 1; mode=block status: code: 200 message: OK - request: - body: account_id=1234567890123456&comment=makes+the+bad+post&status_ids%5B%5D=109304276308745948 + body: account_id=109336623311102204&comment=makes+the+bad+post&status_ids%5B%5D=109336679805186973 headers: Accept: - '*/*' @@ -143,7 +143,7 @@ interactions: Connection: - keep-alive Content-Length: - - '90' + - '92' Content-Type: - application/x-www-form-urlencoded User-Agent: @@ -152,17 +152,17 @@ interactions: uri: http://localhost:3000/api/v1/reports/ response: body: - string: '{"id":"1","action_taken":false,"action_taken_at":null,"category":"other","comment":"makes - the bad post","forwarded":false,"created_at":"2022-11-07T19:54:55.890Z","status_ids":[109304276308745948],"rule_ids":null,"target_account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"John - Lennon","locked":true,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-07T00:00:00.000Z","note":"\u003cp\u003eI - walk funny\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/system/accounts/avatars/123/456/789/012/345/original/2d5ad2a2a4ca9e32.jpg","avatar_static":"http://localhost:3000/system/accounts/avatars/123/456/789/012/345/original/2d5ad2a2a4ca9e32.jpg","header":"http://localhost:3000/system/accounts/headers/123/456/789/012/345/original/51bc27ef4d67326e.jpg","header_static":"http://localhost:3000/system/accounts/headers/123/456/789/012/345/original/51bc27ef4d67326e.jpg","followers_count":0,"following_count":0,"statuses_count":10,"last_status_at":"2022-11-07","noindex":false,"emojis":[],"fields":[{"name":"bread","value":"toasty.","verified_at":null},{"name":"lasagna","value":"no!!!","verified_at":null}]}}' + string: '{"id":"2","action_taken":false,"action_taken_at":null,"category":"other","comment":"makes + the bad post","forwarded":false,"created_at":"2022-11-13T13:15:33.994Z","status_ids":[109336679805186973],"rule_ids":null,"target_account":{"id":"109336623311102204","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/336/623/311/102/204/original/8f758332953652da.jpg","avatar_static":"http://localhost:3000/system/accounts/avatars/109/336/623/311/102/204/original/8f758332953652da.jpg","header":"http://localhost:3000/system/accounts/headers/109/336/623/311/102/204/original/c7470bf076df1e55.jpg","header_static":"http://localhost:3000/system/accounts/headers/109/336/623/311/102/204/original/c7470bf076df1e55.jpg","followers_count":0,"following_count":0,"statuses_count":17,"last_status_at":"2022-11-13","noindex":false,"emojis":[],"fields":[{"name":"bread","value":"toasty.","verified_at":null},{"name":"lasagna","value":"no!!!","verified_at":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-VmRODdKe3a1xaLjZFfHJqw==''; + style-src ''self'' http://localhost:3000 ''nonce-jh5HcPGD7Fc3SYz77jPQFA==''; 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 @@ -172,7 +172,7 @@ interactions: Content-Type: - application/json; charset=utf-8 ETag: - - W/"c15aac04babf0e269c09ca24ba38cbe4" + - W/"eb6127142e5399c4696e2e96ba8d4a6b" Referrer-Policy: - strict-origin-when-cross-origin Transfer-Encoding: @@ -192,11 +192,11 @@ interactions: X-RateLimit-Remaining: - '400' X-RateLimit-Reset: - - '2022-11-08T00:00:00.907391Z' + - '2022-11-14T00:00:00.003506Z' X-Request-Id: - - 0b92c9dc-e9e9-43c4-957e-70f2064e3dc0 + - 54fad065-eda8-4e75-8de6-378fe63935f5 X-Runtime: - - '0.037742' + - '0.018125' X-XSS-Protection: - 1; mode=block status: @@ -218,20 +218,20 @@ interactions: User-Agent: - tests/v311 method: DELETE - uri: http://localhost:3000/api/v1/statuses/109304276308745948 + uri: http://localhost:3000/api/v1/statuses/109336679805186973 response: body: - string: '{"id":"109304276308745948","created_at":"2022-11-07T19:54:55.825Z","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/109304276308745948","url":"http://localhost:3000/@mastodonpy_test/109304276308745948","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":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"John - Lennon","locked":true,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-07T00:00:00.000Z","note":"\u003cp\u003eI - walk funny\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/system/accounts/avatars/123/456/789/012/345/original/2d5ad2a2a4ca9e32.jpg","avatar_static":"http://localhost:3000/system/accounts/avatars/123/456/789/012/345/original/2d5ad2a2a4ca9e32.jpg","header":"http://localhost:3000/system/accounts/headers/123/456/789/012/345/original/51bc27ef4d67326e.jpg","header_static":"http://localhost:3000/system/accounts/headers/123/456/789/012/345/original/51bc27ef4d67326e.jpg","followers_count":0,"following_count":0,"statuses_count":9,"last_status_at":"2022-11-07","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}' + string: '{"id":"109336679805186973","created_at":"2022-11-13T13:15:33.943Z","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/109336679805186973","url":"http://localhost:3000/@mastodonpy_test/109336679805186973","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":"109336623311102204","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/336/623/311/102/204/original/8f758332953652da.jpg","avatar_static":"http://localhost:3000/system/accounts/avatars/109/336/623/311/102/204/original/8f758332953652da.jpg","header":"http://localhost:3000/system/accounts/headers/109/336/623/311/102/204/original/c7470bf076df1e55.jpg","header_static":"http://localhost:3000/system/accounts/headers/109/336/623/311/102/204/original/c7470bf076df1e55.jpg","followers_count":0,"following_count":0,"statuses_count":16,"last_status_at":"2022-11-13","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-/DNgg0ZmlEQ3p5z0Y7n+CA==''; + style-src ''self'' http://localhost:3000 ''nonce-KontlQZQNBloUzR394jD+A==''; 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 @@ -241,7 +241,7 @@ interactions: Content-Type: - application/json; charset=utf-8 ETag: - - W/"8f3de8eeb0ea794813d81da6280a6dda" + - W/"b060d8d15f27440c3480fd5d8bf94970" Referrer-Policy: - strict-origin-when-cross-origin Transfer-Encoding: @@ -257,9 +257,9 @@ interactions: X-Permitted-Cross-Domain-Policies: - none X-Request-Id: - - bbe67b0c-1465-4e44-b70c-9cd01f4a12f8 + - c4f7ca46-176c-4f49-9b3c-aad84e2c6386 X-Runtime: - - '0.029822' + - '0.024354' X-XSS-Protection: - 1; mode=block status: -- cgit v1.2.3