aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cassettes/test_poll_illegal_vote.yaml')
-rw-r--r--tests/cassettes/test_poll_illegal_vote.yaml246
1 files changed, 175 insertions, 71 deletions
diff --git a/tests/cassettes/test_poll_illegal_vote.yaml b/tests/cassettes/test_poll_illegal_vote.yaml
index f6aca42..1d7b8ac 100644
--- a/tests/cassettes/test_poll_illegal_vote.yaml
+++ b/tests/cassettes/test_poll_illegal_vote.yaml
@@ -1,93 +1,197 @@
1interactions: 1interactions:
2- request: 2- request:
3 body: '{"poll": {"hide_totals": false, "multiple": false, "expires_in": 300, "options": 3 body: '{"status": "nice", "poll": {"options": ["four twenty", "sixty-nine"], "expires_in":
4 ["four twenty", "sixty-nine"]}, "status": "nice"}' 4 300, "multiple": false, "hide_totals": false}}'
5 headers: 5 headers:
6 Accept: ['*/*'] 6 Accept:
7 Accept-Encoding: ['gzip, deflate'] 7 - '*/*'
8 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN_2] 8 Accept-Encoding:
9 Connection: [keep-alive] 9 - gzip, deflate
10 Content-Length: ['130'] 10 Authorization:
11 Content-Type: [application/json] 11 - Bearer __MASTODON_PY_TEST_ACCESS_TOKEN_2
12 User-Agent: [python-requests/2.18.4] 12 Connection:
13 - keep-alive
14 Content-Length:
15 - '130'
16 Content-Type:
17 - application/json
18 User-Agent:
19 - tests/v311
13 method: POST 20 method: POST
14 uri: http://localhost:3000/api/v1/statuses 21 uri: http://localhost:3000/api/v1/statuses
15 response: 22 response:
16 body: {string: '{"id":"103704150669322767","created_at":"2020-02-22T19:29:19.988Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost/users/admin/statuses/103704150669322767","url":"http://localhost/@admin/103704150669322767","replies_count":0,"reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"content":"\u003cp\u003enice\u003c/p\u003e","reblog":null,"application":{"name":"Mastodon.py 23 body:
17 test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2020-02-22T19:13:53.944Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost/@admin","avatar":"http://localhost/avatars/original/missing.png","avatar_static":"http://localhost/avatars/original/missing.png","header":"http://localhost/headers/original/missing.png","header_static":"http://localhost/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":1,"last_status_at":"2020-02-22","emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":{"id":"2","expires_at":"2020-02-22T19:34:19.971Z","expired":false,"multiple":false,"votes_count":0,"voters_count":0,"voted":true,"own_votes":[],"options":[{"title":"four 24 string: '{"id":"109304276106259799","created_at":"2022-11-07T19:54:52.741Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/109304276106259799","url":"http://localhost:3000/@admin/109304276106259799","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"content":"\u003cp\u003enice\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py
18 twenty","votes_count":0},{"title":"sixty-nine","votes_count":0}],"emojis":[]}}'} 25 test suite","website":null},"account":{"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":2,"last_status_at":"2022-11-07","noindex":false,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":{"id":"2","expires_at":"2022-11-07T19:59:52.738Z","expired":false,"multiple":false,"votes_count":0,"voters_count":0,"voted":true,"own_votes":[],"options":[{"title":"four
26 twenty","votes_count":0},{"title":"sixty-nine","votes_count":0}],"emojis":[]}}'
19 headers: 27 headers:
20 Cache-Control: ['no-cache, no-store'] 28 Cache-Control:
21 Content-Type: [application/json; charset=utf-8] 29 - no-store
22 Referrer-Policy: [strict-origin-when-cross-origin] 30 Content-Security-Policy:
23 Transfer-Encoding: [chunked] 31 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src
24 Vary: ['Accept-Encoding, Origin'] 32 ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000;
25 X-Content-Type-Options: [nosniff] 33 style-src ''self'' http://localhost:3000 ''nonce-KWtaFOwK0GCoht8tJcrpUQ=='';
26 X-Download-Options: [noopen] 34 media-src ''self'' https: data: http://localhost:3000; frame-src ''self''
27 X-Frame-Options: [SAMEORIGIN] 35 https:; manifest-src ''self'' http://localhost:3000; connect-src ''self''
28 X-Permitted-Cross-Domain-Policies: [none] 36 data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000
29 X-Request-Id: [abfc4ec8-fb95-4035-81bc-81062b1e08b9] 37 ws://localhost:3035 http://localhost:3035; script-src ''self'' ''unsafe-inline''
30 X-Runtime: ['0.216296'] 38 ''unsafe-eval'' http://localhost:3000; child-src ''self'' blob: http://localhost:3000;
31 X-XSS-Protection: [1; mode=block] 39 worker-src ''self'' blob: http://localhost:3000'
32 content-length: ['1496'] 40 Content-Type:
33 status: {code: 200, message: OK} 41 - application/json; charset=utf-8
42 ETag:
43 - W/"3e6460cb19416fd3a27d2afd2227ef87"
44 Referrer-Policy:
45 - strict-origin-when-cross-origin
46 Transfer-Encoding:
47 - chunked
48 Vary:
49 - Accept, Origin
50 X-Content-Type-Options:
51 - nosniff
52 X-Download-Options:
53 - noopen
54 X-Frame-Options:
55 - SAMEORIGIN
56 X-Permitted-Cross-Domain-Policies:
57 - none
58 X-RateLimit-Limit:
59 - '300'
60 X-RateLimit-Remaining:
61 - '295'
62 X-RateLimit-Reset:
63 - '2022-11-07T21:00:00.772229Z'
64 X-Request-Id:
65 - b0177276-2836-419a-ae28-c7bad38f76c9
66 X-Runtime:
67 - '0.054317'
68 X-XSS-Protection:
69 - 1; mode=block
70 status:
71 code: 200
72 message: OK
34- request: 73- request:
35 body: choices%5B%5D=1 74 body: choices%5B%5D=1
36 headers: 75 headers:
37 Accept: ['*/*'] 76 Accept:
38 Accept-Encoding: ['gzip, deflate'] 77 - '*/*'
39 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN] 78 Accept-Encoding:
40 Connection: [keep-alive] 79 - gzip, deflate
41 Content-Length: ['15'] 80 Authorization:
42 Content-Type: [application/x-www-form-urlencoded] 81 - Bearer __MASTODON_PY_TEST_ACCESS_TOKEN
43 User-Agent: [python-requests/2.18.4] 82 Connection:
83 - keep-alive
84 Content-Length:
85 - '15'
86 Content-Type:
87 - application/x-www-form-urlencoded
88 User-Agent:
89 - tests/v311
44 method: POST 90 method: POST
45 uri: http://localhost:3000/api/v1/polls/2/votes 91 uri: http://localhost:3000/api/v1/polls/2/votes
46 response: 92 response:
47 body: {string: '{"id":"2","expires_at":"2020-02-22T19:34:19.971Z","expired":false,"multiple":false,"votes_count":1,"voters_count":1,"voted":true,"own_votes":[1],"options":[{"title":"four 93 body:
48 twenty","votes_count":0},{"title":"sixty-nine","votes_count":1}],"emojis":[]}'} 94 string: '{"id":"2","expires_at":"2022-11-07T19:59:52.738Z","expired":false,"multiple":false,"votes_count":1,"voters_count":1,"voted":true,"own_votes":[1],"options":[{"title":"four
95 twenty","votes_count":0},{"title":"sixty-nine","votes_count":1}],"emojis":[]}'
49 headers: 96 headers:
50 Cache-Control: ['no-cache, no-store'] 97 Cache-Control:
51 Content-Type: [application/json; charset=utf-8] 98 - no-store
52 Referrer-Policy: [strict-origin-when-cross-origin] 99 Content-Security-Policy:
53 Transfer-Encoding: [chunked] 100 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src
54 Vary: ['Accept-Encoding, Origin'] 101 ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000;
55 X-Content-Type-Options: [nosniff] 102 style-src ''self'' http://localhost:3000 ''nonce-wNJ/EbJ5E1jFxYNJdQrOkg=='';
56 X-Download-Options: [noopen] 103 media-src ''self'' https: data: http://localhost:3000; frame-src ''self''
57 X-Frame-Options: [SAMEORIGIN] 104 https:; manifest-src ''self'' http://localhost:3000; connect-src ''self''
58 X-Permitted-Cross-Domain-Policies: [none] 105 data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000
59 X-Request-Id: [dee72c90-e1cc-4a6e-8e27-14fbda1671af] 106 ws://localhost:3035 http://localhost:3035; script-src ''self'' ''unsafe-inline''
60 X-Runtime: ['0.086159'] 107 ''unsafe-eval'' http://localhost:3000; child-src ''self'' blob: http://localhost:3000;
61 X-XSS-Protection: [1; mode=block] 108 worker-src ''self'' blob: http://localhost:3000'
62 content-length: ['248'] 109 Content-Type:
63 status: {code: 200, message: OK} 110 - application/json; charset=utf-8
111 ETag:
112 - W/"b076985dc7b872bb2ab766a6e8218a39"
113 Referrer-Policy:
114 - strict-origin-when-cross-origin
115 Transfer-Encoding:
116 - chunked
117 Vary:
118 - Accept, Origin
119 X-Content-Type-Options:
120 - nosniff
121 X-Download-Options:
122 - noopen
123 X-Frame-Options:
124 - SAMEORIGIN
125 X-Permitted-Cross-Domain-Policies:
126 - none
127 X-Request-Id:
128 - 962f99b8-14dc-4b84-82b3-141cc9bd74d1
129 X-Runtime:
130 - '0.026520'
131 X-XSS-Protection:
132 - 1; mode=block
133 status:
134 code: 200
135 message: OK
64- request: 136- request:
65 body: choices%5B%5D=0 137 body: choices%5B%5D=0
66 headers: 138 headers:
67 Accept: ['*/*'] 139 Accept:
68 Accept-Encoding: ['gzip, deflate'] 140 - '*/*'
69 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN] 141 Accept-Encoding:
70 Connection: [keep-alive] 142 - gzip, deflate
71 Content-Length: ['15'] 143 Authorization:
72 Content-Type: [application/x-www-form-urlencoded] 144 - Bearer __MASTODON_PY_TEST_ACCESS_TOKEN
73 User-Agent: [python-requests/2.18.4] 145 Connection:
146 - keep-alive
147 Content-Length:
148 - '15'
149 Content-Type:
150 - application/x-www-form-urlencoded
151 User-Agent:
152 - tests/v311
74 method: POST 153 method: POST
75 uri: http://localhost:3000/api/v1/polls/2/votes 154 uri: http://localhost:3000/api/v1/polls/2/votes
76 response: 155 response:
77 body: {string: '{"error":"Validation failed: You have already voted on this poll"}'} 156 body:
157 string: "{\"error\":\"\u30D0\u30EA\u30C7\u30FC\u30B7\u30E7\u30F3\u306B\u5931\u6557\u3057\u307E\u3057\u305F:
158 \u3053\u306E\u30A2\u30F3\u30B1\u30FC\u30C8\u306B\u306F\u6295\u7968\u6E08\u307F\u3067\u3059\"}"
78 headers: 159 headers:
79 Cache-Control: ['no-cache, no-store'] 160 Cache-Control:
80 Content-Type: [application/json; charset=utf-8] 161 - no-store
81 Referrer-Policy: [strict-origin-when-cross-origin] 162 Content-Security-Policy:
82 Transfer-Encoding: [chunked] 163 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src
83 Vary: ['Accept-Encoding, Origin'] 164 ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000;
84 X-Content-Type-Options: [nosniff] 165 style-src ''self'' http://localhost:3000 ''nonce-ngEU5rwwKi6kHyZ1TkIQtg=='';
85 X-Download-Options: [noopen] 166 media-src ''self'' https: data: http://localhost:3000; frame-src ''self''
86 X-Frame-Options: [SAMEORIGIN] 167 https:; manifest-src ''self'' http://localhost:3000; connect-src ''self''
87 X-Permitted-Cross-Domain-Policies: [none] 168 data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000
88 X-Request-Id: [e88cc93f-74fb-4f40-8e57-f33257935610] 169 ws://localhost:3035 http://localhost:3035; script-src ''self'' ''unsafe-inline''
89 X-Runtime: ['0.076578'] 170 ''unsafe-eval'' http://localhost:3000; child-src ''self'' blob: http://localhost:3000;
90 X-XSS-Protection: [1; mode=block] 171 worker-src ''self'' blob: http://localhost:3000'
91 content-length: ['66'] 172 Content-Type:
92 status: {code: 422, message: Unprocessable Entity} 173 - application/json; charset=utf-8
174 Referrer-Policy:
175 - strict-origin-when-cross-origin
176 Transfer-Encoding:
177 - chunked
178 Vary:
179 - Accept, Origin
180 X-Content-Type-Options:
181 - nosniff
182 X-Download-Options:
183 - noopen
184 X-Frame-Options:
185 - SAMEORIGIN
186 X-Permitted-Cross-Domain-Policies:
187 - none
188 X-Request-Id:
189 - 290065a6-737d-4655-a8ec-3986f0cda68d
190 X-Runtime:
191 - '0.681554'
192 X-XSS-Protection:
193 - 1; mode=block
194 status:
195 code: 422
196 message: Unprocessable Entity
93version: 1 197version: 1
Powered by cgit v1.2.3 (git 2.41.0)