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_follow_request_reject.yaml | 102 +++++++++++++++++++----- 1 file changed, 82 insertions(+), 20 deletions(-) (limited to 'tests/cassettes/test_follow_request_reject.yaml') diff --git a/tests/cassettes/test_follow_request_reject.yaml b/tests/cassettes/test_follow_request_reject.yaml index caea3ca..9647660 100644 --- a/tests/cassettes/test_follow_request_reject.yaml +++ b/tests/cassettes/test_follow_request_reject.yaml @@ -1,6 +1,67 @@ interactions: - request: - body: id=1234567890123456&reblogs=1 + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Authorization: + - Bearer __MASTODON_PY_TEST_ACCESS_TOKEN + Connection: + - keep-alive + User-Agent: + - tests/v311 + method: GET + uri: http://localhost:3000/api/v1/accounts/verify_credentials + response: + body: + 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":3,"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-4ljsecejhhptEJQeIgsrvg==''; + 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 + ws://localhost:3035 http://localhost:3035; script-src ''self'' ''unsafe-inline'' + ''unsafe-eval'' http://localhost:3000; child-src ''self'' blob: http://localhost:3000; + worker-src ''self'' blob: http://localhost:3000' + Content-Type: + - application/json; charset=utf-8 + ETag: + - W/"dce7c9745705c468836e3126d8118b03" + Referrer-Policy: + - strict-origin-when-cross-origin + Transfer-Encoding: + - chunked + Vary: + - Accept, Origin + X-Content-Type-Options: + - nosniff + X-Download-Options: + - noopen + X-Frame-Options: + - SAMEORIGIN + X-Permitted-Cross-Domain-Policies: + - none + X-Request-Id: + - 544fa1f9-f141-4ce3-98a9-f6228687f4f2 + X-Runtime: + - '0.012213' + X-XSS-Protection: + - 1; mode=block + status: + code: 200 + message: OK +- request: + body: id=109336623311102204&reblogs=1 headers: Accept: - '*/*' @@ -11,23 +72,23 @@ interactions: Connection: - keep-alive Content-Length: - - '29' + - '31' Content-Type: - application/x-www-form-urlencoded User-Agent: - tests/v311 method: POST - uri: http://localhost:3000/api/v1/accounts/1234567890123456/follow + uri: http://localhost:3000/api/v1/accounts/109336623311102204/follow response: body: - string: '{"id":"1234567890123456","following":false,"showing_reblogs":true,"notifying":false,"languages":null,"followed_by":false,"blocking":false,"blocked_by":false,"muting":false,"muting_notifications":false,"requested":true,"domain_blocking":false,"endorsed":false,"note":""}' + string: '{"id":"109336623311102204","following":false,"showing_reblogs":true,"notifying":false,"languages":null,"followed_by":false,"blocking":false,"blocked_by":false,"muting":false,"muting_notifications":false,"requested":true,"domain_blocking":false,"endorsed":false,"note":""}' 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-WDNYR1F4wXPfpLI8rliivA==''; + style-src ''self'' http://localhost:3000 ''nonce-KwYl/QMJ40x/jxv8HgYFsg==''; 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 @@ -37,7 +98,7 @@ interactions: Content-Type: - application/json; charset=utf-8 ETag: - - W/"acf0f73e9e8c6d95924890c1315db0fd" + - W/"c9017603ea01c27c666346fa4fcf6163" Referrer-Policy: - strict-origin-when-cross-origin Transfer-Encoding: @@ -57,11 +118,11 @@ interactions: X-RateLimit-Remaining: - '398' X-RateLimit-Reset: - - '2022-11-08T00:00:00.662848Z' + - '2022-11-14T00:00:00.496438Z' X-Request-Id: - - 5f3206d9-2e4f-4de4-be89-fc293322cc29 + - 7d29b289-d836-4d93-ad5f-5199615e57f7 X-Runtime: - - '0.021385' + - '0.018329' X-XSS-Protection: - 1; mode=block status: @@ -84,14 +145,14 @@ interactions: uri: http://localhost:3000/api/v1/follow_requests response: body: - string: '[{"id":"109304268902557892","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-07T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":3,"last_status_at":"2022-11-07","noindex":false,"emojis":[],"fields":[]}]' + string: '[{"id":"109336623096259500","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-13T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":3,"last_status_at":"2022-11-13","noindex":false,"emojis":[],"fields":[]}]' 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-VFJOIr53sCF8F7q0mHzEaA==''; + style-src ''self'' http://localhost:3000 ''nonce-KwKFk9b2Hp64uT/2kqkOfw==''; 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 @@ -101,7 +162,7 @@ interactions: Content-Type: - application/json; charset=utf-8 ETag: - - W/"e614b4039f2a8a9f7ac18423d5f529e5" + - W/"8643b7b02e183007a55f69f8f0544767" Link: - ; rel="prev" Referrer-Policy: @@ -119,9 +180,9 @@ interactions: X-Permitted-Cross-Domain-Policies: - none X-Request-Id: - - 5d48ab91-1216-4773-8d3b-74f6f1dbd3b4 + - 53a38ffa-ee95-4e92-9e54-0bc4b4488072 X-Runtime: - - '0.013511' + - '0.014696' X-XSS-Protection: - 1; mode=block status: @@ -143,17 +204,18 @@ interactions: User-Agent: - tests/v311 method: POST - uri: http://localhost:3000/api/v1/follow_requests/109304268902557892/reject + uri: http://localhost:3000/api/v1/follow_requests/109336623096259500/reject response: body: - string: '{"id":"109304268902557892","following":false,"showing_reblogs":false,"notifying":false,"languages":null,"followed_by":false,"blocking":false,"blocked_by":false,"muting":false,"muting_notifications":false,"requested":false,"domain_blocking":false,"endorsed":false,"note":""}' + string: '{"id":"109336623096259500","following":false,"showing_reblogs":false,"notifying":false,"languages":null,"followed_by":false,"blocking":false,"blocked_by":false,"muting":false,"muting_notifications":false,"requested":false,"domain_blocking":false,"endorsed":false,"note":"top + ebayer gerne wieder"}' 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-FCmrnpo6jA+SHJOGzGTlng==''; + style-src ''self'' http://localhost:3000 ''nonce-C6C6ydulQLzBObPZPmfeWw==''; 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 @@ -163,7 +225,7 @@ interactions: Content-Type: - application/json; charset=utf-8 ETag: - - W/"8d8caa68e50963507d45a12d820e86b0" + - W/"fc5fa4da9317772baa3b6968b8c31a68" Referrer-Policy: - strict-origin-when-cross-origin Transfer-Encoding: @@ -179,9 +241,9 @@ interactions: X-Permitted-Cross-Domain-Policies: - none X-Request-Id: - - 7e948b08-50f6-4f74-8a09-f823f6b54dd8 + - a972bf81-e361-4a66-b288-50f25456a840 X-Runtime: - - '0.031472' + - '0.021696' X-XSS-Protection: - 1; mode=block status: -- cgit v1.2.3