From 3277ca777821e76955fb26d80788939a311db9db Mon Sep 17 00:00:00 2001 From: halcy Date: Mon, 7 Nov 2022 23:11:30 +0200 Subject: Initial test fixing pass. Four tests still fail. --- tests/cassettes/test_push_delete.yaml | 222 ++++++++++++++++++++++++---------- 1 file changed, 158 insertions(+), 64 deletions(-) (limited to 'tests/cassettes/test_push_delete.yaml') diff --git a/tests/cassettes/test_push_delete.yaml b/tests/cassettes/test_push_delete.yaml index dab6881..19e4605 100644 --- a/tests/cassettes/test_push_delete.yaml +++ b/tests/cassettes/test_push_delete.yaml @@ -1,86 +1,180 @@ interactions: - request: - body: subscription%5Bendpoint%5D=https%3A%2F%2Fexample.com&subscription%5Bkeys%5D%5Bp256dh%5D=BPJLfW03%2BNP04NbhC8zJs5xd30bDL%2B%2B0AghNrF1KcYN5uuznaJz%2FY%2B4s%2Bhe2e4FOiA80RQtYDUvJadQ6J3vvhyc%3D&subscription%5Bkeys%5D%5Bauth%5D=7J%2BeGTcOf7YRVA1Tbk06hg%3D%3D + body: subscription%5Bendpoint%5D=https%3A%2F%2Fexample.com&subscription%5Bkeys%5D%5Bp256dh%5D=BBaCe5f0XCe0yktCrWzOGfZ9RGDNdNBA7LpbMBrwsRgALTpJgVLoBx5wKTQ9g5kjYlS4a%2BEZgeTA661PPUcSmxc%3D&subscription%5Bkeys%5D%5Bauth%5D=rP0KB25am52fthOb6cQQzA%3D%3D headers: - Accept: ['*/*'] - Accept-Encoding: ['gzip, deflate'] - Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN] - Connection: [keep-alive] - Content-Length: ['254'] - Content-Type: [application/x-www-form-urlencoded] - User-Agent: [python-requests/2.18.4] + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Authorization: + - Bearer __MASTODON_PY_TEST_ACCESS_TOKEN + Connection: + - keep-alive + Content-Length: + - '242' + Content-Type: + - application/x-www-form-urlencoded + User-Agent: + - tests/v311 method: POST uri: http://localhost:3000/api/v1/push/subscription response: - body: {string: '{"id":3,"endpoint":"https://example.com","alerts":{},"server_key":"BPSW9N0oBHCeTlN6VgEPwlf36QQzuU6XtxguTJSM9xyW9kxnN2I_lzcHsk3ShJMRa0Na7t2kiE9UyJWrtQOsTJo="}'} + body: + string: '{"id":3,"endpoint":"https://example.com","alerts":{},"server_key":"BFsPJBvWr6iQB4n0QAxBbqg5_MLh-Rm1we2OefcfRUaqTrZrB6k0E9FdzlBWD_xp8KAJrsWetwf2-l11cvSQnDU="}' headers: - Cache-Control: ['no-cache, no-store'] - Content-Type: [application/json; charset=utf-8] - Referrer-Policy: [strict-origin-when-cross-origin] - Transfer-Encoding: [chunked] - Vary: ['Accept-Encoding, Origin'] - X-Content-Type-Options: [nosniff] - X-Download-Options: [noopen] - X-Frame-Options: [SAMEORIGIN] - X-Permitted-Cross-Domain-Policies: [none] - X-Request-Id: [182697a5-92aa-431d-9bd5-8e17a24c6ffc] - X-Runtime: ['0.039294'] - X-XSS-Protection: [1; mode=block] - content-length: ['157'] - status: {code: 200, message: OK} + 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-XC0dhdOGpvpL47EswqtZcA==''; + 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/"398bcee62a4034e17faa19a210fae833" + 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: + - 03b97cc9-68b0-49ac-9b07-8bc9e6607ef5 + X-Runtime: + - '0.014296' + X-XSS-Protection: + - 1; mode=block + status: + code: 200 + message: OK - request: body: null headers: - Accept: ['*/*'] - Accept-Encoding: ['gzip, deflate'] - Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN] - Connection: [keep-alive] - Content-Length: ['0'] - User-Agent: [python-requests/2.18.4] + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate + Authorization: + - Bearer __MASTODON_PY_TEST_ACCESS_TOKEN + Connection: + - keep-alive + Content-Length: + - '0' + User-Agent: + - tests/v311 method: DELETE uri: http://localhost:3000/api/v1/push/subscription response: - body: {string: '{}'} + body: + string: '{}' headers: - Cache-Control: ['no-cache, no-store'] - Content-Type: [application/json; charset=utf-8] - Referrer-Policy: [strict-origin-when-cross-origin] - Transfer-Encoding: [chunked] - Vary: ['Accept-Encoding, Origin'] - X-Content-Type-Options: [nosniff] - X-Download-Options: [noopen] - X-Frame-Options: [SAMEORIGIN] - X-Permitted-Cross-Domain-Policies: [none] - X-Request-Id: [740dd74c-cf1d-47db-9da8-1572eadfd546] - X-Runtime: ['0.062684'] - X-XSS-Protection: [1; mode=block] - content-length: ['2'] - status: {code: 200, message: OK} + 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-QNwmHb5+a9IJE1NionA6aw==''; + 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/"44136fa355b3678a1146ad16f7e8649e" + 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: + - 89f2550a-77b3-4680-a599-de2d4c231b97 + X-Runtime: + - '0.011466' + X-XSS-Protection: + - 1; mode=block + status: + code: 200 + message: OK - request: body: null headers: - Accept: ['*/*'] - Accept-Encoding: ['gzip, deflate'] - Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN] - Connection: [keep-alive] - User-Agent: [python-requests/2.18.4] + 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/push/subscription response: - body: {string: '{"error":"Record not found"}'} + body: + string: '{"error":"Not Found"}' headers: - Cache-Control: ['no-cache, no-store'] - Content-Type: [application/json; charset=utf-8] - Referrer-Policy: [strict-origin-when-cross-origin] - Transfer-Encoding: [chunked] - Vary: ['Accept-Encoding, Origin'] - X-Content-Type-Options: [nosniff] - X-Download-Options: [noopen] - X-Frame-Options: [SAMEORIGIN] - X-Permitted-Cross-Domain-Policies: [none] - X-Request-Id: [77cb9346-5db6-4f77-abd5-7781d238e6d5] - X-Runtime: ['0.032786'] - X-XSS-Protection: [1; mode=block] - content-length: ['28'] - status: {code: 404, message: Not Found} + 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-O2jjgL99U6dhnTkBoyBiHA==''; + 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 + 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: + - 038b3671-9c22-4f12-91e9-5ad99d14cf20 + X-Runtime: + - '0.041113' + X-XSS-Protection: + - 1; mode=block + status: + code: 404 + message: Not Found version: 1 -- cgit v1.2.3