Mastodonplus.py/tests/cassettes/test_push_delete.yaml
2018-07-30 23:19:51 +02:00

89 líneas
3,4 KiB
YAML

interactions:
- request:
body: subscription%5Bendpoint%5D=https%3A%2F%2Fexample.com&subscription%5Bkeys%5D%5Bp256dh%5D=BOy%2BkCX9w1ntVvdRRRpyV4JNUw2cVpRkfi8WS1z3McvgDujbY9YICQV1kD3%2BuTu4GT1e2XNCFSSvF1RIDpZB8Ro%3D&subscription%5Bkeys%5D%5Bauth%5D=KKrv91gEAZ3DYZk0uGn%2BIw%3D%3D
headers:
Accept: ['*/*']
Accept-Encoding: ['gzip, deflate']
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
Connection: [keep-alive]
Content-Length: ['246']
Content-Type: [application/x-www-form-urlencoded]
User-Agent: [python-requests/2.18.4]
method: POST
uri: http://localhost:3000/api/v1/push/subscription
response:
body: {string: '{"id":9,"endpoint":"https://example.com","alerts":{},"server_key":"BFUzywftzA81kLihlpi_bTniTwxuGp_D2gX9CHRq4qJQJgsKQUFyc8juKZ-fHMR6YxnA1A1qhgVvMTChH21CMhY="}'}
headers:
Cache-Control: ['max-age=0, private, must-revalidate']
Content-Type: [application/json; charset=utf-8]
ETag: [W/"9bc9f474e2e4e8007f104cef3870d96f"]
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: [ef780356-1392-42a2-b19f-9fb040b97b17]
X-Runtime: ['0.029904']
X-XSS-Protection: [1; mode=block]
content-length: ['157']
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]
method: DELETE
uri: http://localhost:3000/api/v1/push/subscription
response:
body: {string: '{}'}
headers:
Cache-Control: ['max-age=0, private, must-revalidate']
Content-Type: [application/json; charset=utf-8]
ETag: [W/"189d0d77b93465d891619d50fe217a85"]
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: [9f21bb4c-d900-4025-a979-9c07ccbd363e]
X-Runtime: ['0.045305']
X-XSS-Protection: [1; mode=block]
content-length: ['2']
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:3000/api/v1/push/subscription
response:
body: {string: '{"error":"Record not found"}'}
headers:
Cache-Control: [no-cache]
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: [732fe4f5-edb1-45b8-9e3b-e439628bcac0]
X-Runtime: ['0.021938']
X-XSS-Protection: [1; mode=block]
content-length: ['28']
status: {code: 404, message: Not Found}
version: 1