aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorenz Diener <[email protected]>2018-06-05 22:52:18 +0200
committerLorenz Diener <[email protected]>2018-06-05 22:52:18 +0200
commit01e52ccd8fe9dda667e0a7cc1a872a0437a10c8e (patch)
tree4e09dc579d8bdad23cda0a19a45937a8b19f48c4 /tests/cassettes/test_push_delete.yaml
parent18c6b3b90ff8bd607df18af86d092ac1205ffbf7 (diff)
downloadmastodon.py-01e52ccd8fe9dda667e0a7cc1a872a0437a10c8e.tar.gz
Add push tests
Diffstat (limited to 'tests/cassettes/test_push_delete.yaml')
-rw-r--r--tests/cassettes/test_push_delete.yaml88
1 files changed, 88 insertions, 0 deletions
diff --git a/tests/cassettes/test_push_delete.yaml b/tests/cassettes/test_push_delete.yaml
new file mode 100644
index 0000000..92c0acb
--- /dev/null
+++ b/tests/cassettes/test_push_delete.yaml
@@ -0,0 +1,88 @@
1interactions:
2- request:
3 body: subscription%5Bendpoint%5D=https%3A%2F%2Fexample.com&subscription%5Bkeys%5D%5Bp256dh%5D=BKf9D9Gl2PhY6ruoL5t03nMUM%2Fgrz%2FV2t7Ulu9jX8j0CFVp4uI05RdCwg3rc%2BZRauRej7WNr25EVZ6Xu36IjxKI%3D&subscription%5Bkeys%5D%5Bauth%5D=4WFT9tyJwbMJcYaGZ5cqLg%3D%3D
4 headers:
5 Accept: ['*/*']
6 Accept-Encoding: ['gzip, deflate']
7 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
8 Connection: [keep-alive]
9 Content-Length: ['246']
10 Content-Type: [application/x-www-form-urlencoded]
11 User-Agent: [python-requests/2.9.1]
12 method: POST
13 uri: http://localhost:3000/api/v1/push/subscription
14 response:
15 body: {string: '{"id":2,"endpoint":"https://example.com","alerts":{},"server_key":"BEFgv48oiSIH0eOGT7FydL1ukygGBCLjUDocQJQABVZuFedxZr3QRjZQQvaVVrtMALGqQj9Skemt34NvshOvhyo="}'}
16 headers:
17 Cache-Control: ['max-age=0, private, must-revalidate']
18 Content-Type: [application/json; charset=utf-8]
19 ETag: [W/"2332b55e95a78e8117bad874f3a6dfe3"]
20 Referrer-Policy: [strict-origin-when-cross-origin]
21 Transfer-Encoding: [chunked]
22 Vary: ['Accept-Encoding, Origin']
23 X-Content-Type-Options: [nosniff]
24 X-Download-Options: [noopen]
25 X-Frame-Options: [SAMEORIGIN]
26 X-Permitted-Cross-Domain-Policies: [none]
27 X-Request-Id: [7d00e007-87df-40a0-948b-149825c01b29]
28 X-Runtime: ['0.040019']
29 X-XSS-Protection: [1; mode=block]
30 content-length: ['157']
31 status: {code: 200, message: OK}
32- request:
33 body: null
34 headers:
35 Accept: ['*/*']
36 Accept-Encoding: ['gzip, deflate']
37 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
38 Connection: [keep-alive]
39 Content-Length: ['0']
40 User-Agent: [python-requests/2.9.1]
41 method: DELETE
42 uri: http://localhost:3000/api/v1/push/subscription
43 response:
44 body: {string: '{}'}
45 headers:
46 Cache-Control: ['max-age=0, private, must-revalidate']
47 Content-Type: [application/json; charset=utf-8]
48 ETag: [W/"ab10e86dced2746251206331ba63dcdc"]
49 Referrer-Policy: [strict-origin-when-cross-origin]
50 Transfer-Encoding: [chunked]
51 Vary: ['Accept-Encoding, Origin']
52 X-Content-Type-Options: [nosniff]
53 X-Download-Options: [noopen]
54 X-Frame-Options: [SAMEORIGIN]
55 X-Permitted-Cross-Domain-Policies: [none]
56 X-Request-Id: [034c37de-98b0-443d-af63-d6c9e7245302]
57 X-Runtime: ['0.044571']
58 X-XSS-Protection: [1; mode=block]
59 content-length: ['2']
60 status: {code: 200, message: OK}
61- request:
62 body: null
63 headers:
64 Accept: ['*/*']
65 Accept-Encoding: ['gzip, deflate']
66 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
67 Connection: [keep-alive]
68 User-Agent: [python-requests/2.9.1]
69 method: GET
70 uri: http://localhost:3000/api/v1/push/subscription
71 response:
72 body: {string: '{"error":"Record not found"}'}
73 headers:
74 Cache-Control: [no-cache]
75 Content-Type: [application/json; charset=utf-8]
76 Referrer-Policy: [strict-origin-when-cross-origin]
77 Transfer-Encoding: [chunked]
78 Vary: ['Accept-Encoding, Origin']
79 X-Content-Type-Options: [nosniff]
80 X-Download-Options: [noopen]
81 X-Frame-Options: [SAMEORIGIN]
82 X-Permitted-Cross-Domain-Policies: [none]
83 X-Request-Id: [501bfcc2-0621-440b-bac8-57df49dcab3e]
84 X-Runtime: ['0.019924']
85 X-XSS-Protection: [1; mode=block]
86 content-length: ['28']
87 status: {code: 404, message: Not Found}
88version: 1
Powered by cgit v1.2.3 (git 2.41.0)