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_nodeinfo.yaml | 171 +++++++++++++++++++++++-------------- 1 file changed, 106 insertions(+), 65 deletions(-) (limited to 'tests/cassettes/test_nodeinfo.yaml') diff --git a/tests/cassettes/test_nodeinfo.yaml b/tests/cassettes/test_nodeinfo.yaml index b4a418f..fd0a81d 100644 --- a/tests/cassettes/test_nodeinfo.yaml +++ b/tests/cassettes/test_nodeinfo.yaml @@ -2,80 +2,121 @@ interactions: - 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/.well-known/nodeinfo response: - body: {string: '{"links":[{"rel":"http://nodeinfo.diaspora.software/ns/schema/2.0","href":"http://localhost/nodeinfo/2.0"}]}'} + body: + string: '{"links":[{"rel":"http://nodeinfo.diaspora.software/ns/schema/2.0","href":"http://localhost:3000/nodeinfo/2.0"}]}' headers: - Cache-Control: ['max-age=259200, public'] - Content-Type: [application/json; charset=utf-8] - Date: ['Sat, 22 Feb 2020 19:28:40 GMT'] - ETag: [W/"765ed8d65d8333f722ad1b021068b547"] - Referrer-Policy: [strict-origin-when-cross-origin] - Transfer-Encoding: [chunked] - Vary: ['Accept, 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: [2857405a-9a6a-49aa-94ab-cb5331a15df2] - X-Runtime: ['0.048451'] - X-XSS-Protection: [1; mode=block] - content-length: ['108'] - status: {code: 200, message: OK} + Cache-Control: + - max-age=259200, public + 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-N/2LDU6K/8HmVTeHvlevuw==''; + 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 + Date: + - Mon, 07 Nov 2022 19:54:43 GMT + ETag: + - W/"30113ea20db19da6a25dac6491c2351e" + 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: + - 1793545a-5f31-4bf5-9dbf-2a00f0a0dc88 + X-Runtime: + - '0.007960' + 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] - method: GET - uri: http://localhost/nodeinfo/2.0 - response: - body: {string: "\r\n404 Not Found\r\n\r\n

404 - Not Found

\r\n
nginx/1.14.0 (Ubuntu)
\r\n\r\n\r\n"} - headers: - Connection: [keep-alive] - Content-Type: [text/html] - Date: ['Sat, 22 Feb 2020 19:28:40 GMT'] - Server: [nginx/1.14.0 (Ubuntu)] - Transfer-Encoding: [chunked] - content-length: ['178'] - status: {code: 404, message: Not Found} -- 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/nodeinfo/2.0 response: - body: {string: '{"version":"2.0","software":{"name":"mastodon","version":"3.1.1"},"protocols":["activitypub"],"usage":{"users":{"total":3,"activeMonth":3,"activeHalfyear":3},"localPosts":1},"openRegistrations":true}'} + body: + string: '{"version":"2.0","software":{"name":"mastodon","version":"4.0.0rc1"},"protocols":["activitypub"],"services":{"outbound":[],"inbound":[]},"usage":{"users":{"total":4,"activeMonth":0,"activeHalfyear":0},"localPosts":4},"openRegistrations":true,"metadata":[]}' headers: - Cache-Control: ['max-age=1800, public'] - Content-Type: [application/json; charset=utf-8] - Date: ['Sat, 22 Feb 2020 19:28:41 GMT'] - ETag: [W/"dce5048b9050141b18d1d3fda5194615"] - Referrer-Policy: [strict-origin-when-cross-origin] - Transfer-Encoding: [chunked] - Vary: ['Accept,Accept-Encoding'] - X-Content-Type-Options: [nosniff] - X-Download-Options: [noopen] - X-Frame-Options: [SAMEORIGIN] - X-Permitted-Cross-Domain-Policies: [none] - X-Request-Id: [a8211f49-3b92-412c-927a-a16d31c55a3d] - X-Runtime: ['0.039172'] - X-XSS-Protection: [1; mode=block] - content-length: ['199'] - status: {code: 200, message: OK} + Cache-Control: + - max-age=1800, public + 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-Oxq1BiN3YYRSXsVYkPnXkA==''; + 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 + Date: + - Mon, 07 Nov 2022 19:54:43 GMT + ETag: + - W/"fd825ea898be7ab584119a5eb1f58288" + Referrer-Policy: + - strict-origin-when-cross-origin + Transfer-Encoding: + - chunked + Vary: + - Accept + X-Content-Type-Options: + - nosniff + X-Download-Options: + - noopen + X-Frame-Options: + - SAMEORIGIN + X-Permitted-Cross-Domain-Policies: + - none + X-Request-Id: + - 71499581-5acd-455a-9c6e-236121db8afd + X-Runtime: + - '0.009788' + X-XSS-Protection: + - 1; mode=block + status: + code: 200 + message: OK version: 1 -- cgit v1.2.3