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_authorize.yaml | 114 ++++++++++++++++----- 1 file changed, 88 insertions(+), 26 deletions(-) (limited to 'tests/cassettes/test_follow_request_authorize.yaml') diff --git a/tests/cassettes/test_follow_request_authorize.yaml b/tests/cassettes/test_follow_request_authorize.yaml index 49f21ff..5132df3 100644 --- a/tests/cassettes/test_follow_request_authorize.yaml +++ b/tests/cassettes/test_follow_request_authorize.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-EUfZLN36HZsXieP5oeFpiQ==''; + 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: + - 92b9a179-db48-4777-a1d6-2fa92da100fa + X-Runtime: + - '0.011536' + 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-eBcnVRxXTD6sc1jLLNEIpQ==''; + style-src ''self'' http://localhost:3000 ''nonce-m1MpF8FL9yqDaH2JL6SpHA==''; 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: - '399' X-RateLimit-Reset: - - '2022-11-08T00:00:00.545038Z' + - '2022-11-14T00:00:00.616180Z' X-Request-Id: - - f3d6ccfb-2179-4e8c-bcb5-fb46c0870edd + - 15da12cb-1d26-48e9-9bb1-a848203394d2 X-Runtime: - - '0.028249' + - '0.022842' 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-Pc83BwT56SW0tYznMK8o3w==''; + style-src ''self'' http://localhost:3000 ''nonce-jecWbkAS0SeQ/TAG2RYOgg==''; 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: - - aa42e402-bb45-4fff-9987-aadf53bd87d7 + - 86c71a9e-5e46-4765-8dc1-75916939ff1d X-Runtime: - - '0.014011' + - '0.018126' 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/authorize + uri: http://localhost:3000/api/v1/follow_requests/109336623096259500/authorize response: body: - string: '{"id":"109304268902557892","following":false,"showing_reblogs":false,"notifying":false,"languages":null,"followed_by":true,"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":true,"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-ZgTAOj25y6zVTtehXme3Mg==''; + style-src ''self'' http://localhost:3000 ''nonce-5r9m6dN+Y1GGSrYUG/POTg==''; 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/"12e2c3c81681c48d46a2a0676a657912" + - W/"d0da81e547fdcc929f449a2becd10e15" Referrer-Policy: - strict-origin-when-cross-origin Transfer-Encoding: @@ -179,9 +241,9 @@ interactions: X-Permitted-Cross-Domain-Policies: - none X-Request-Id: - - a92fadab-ead2-44d0-9875-4aa38e0f7df0 + - cac89e94-8297-4bdd-ae6a-ea536e0f9203 X-Runtime: - - '0.040226' + - '0.786460' X-XSS-Protection: - 1; mode=block status: @@ -203,17 +265,17 @@ interactions: User-Agent: - tests/v311 method: POST - uri: http://localhost:3000/api/v1/accounts/1234567890123456/unfollow + uri: http://localhost:3000/api/v1/accounts/109336623311102204/unfollow response: body: - string: '{"id":"1234567890123456","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":"109336623311102204","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":""}' 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-qiwxjL86uSlsu74vn0vJSQ==''; + style-src ''self'' http://localhost:3000 ''nonce-RoPciRMRRWGGMvDduMnOAA==''; 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 @@ -223,7 +285,7 @@ interactions: Content-Type: - application/json; charset=utf-8 ETag: - - W/"76448d2d20dfa7540764936ef5dbc7a9" + - W/"1edce98ad5974b5dd819e31494ac5177" Referrer-Policy: - strict-origin-when-cross-origin Transfer-Encoding: @@ -239,9 +301,9 @@ interactions: X-Permitted-Cross-Domain-Policies: - none X-Request-Id: - - c8fce5ec-8931-48e1-97ab-dbcda98dfb82 + - 090c7974-c4fa-4591-86f0-e7bb438182ab X-Runtime: - - '0.018480' + - '0.016746' X-XSS-Protection: - 1; mode=block status: -- cgit v1.2.3