aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhalcy <halcy@ARARAGI-KUN>2022-11-19 02:34:01 +0200
committerhalcy <halcy@ARARAGI-KUN>2022-11-19 02:34:01 +0200
commit853cd82ecb9e1d25f395514b3bb1616071d43493 (patch)
treea0812b4fa12fadd299886615669f86be6f7bd2cf /tests/cassettes/test_app_account_create_invalid.yaml
parentf26bf0db1dfc93fafa344977bd999a334a55cd36 (diff)
downloadmastodon.py-853cd82ecb9e1d25f395514b3bb1616071d43493.tar.gz
add ability to get detailed signup error from create_account
Diffstat (limited to 'tests/cassettes/test_app_account_create_invalid.yaml')
-rw-r--r--tests/cassettes/test_app_account_create_invalid.yaml245
1 files changed, 245 insertions, 0 deletions
diff --git a/tests/cassettes/test_app_account_create_invalid.yaml b/tests/cassettes/test_app_account_create_invalid.yaml
new file mode 100644
index 0000000..bbf4843
--- /dev/null
+++ b/tests/cassettes/test_app_account_create_invalid.yaml
@@ -0,0 +1,245 @@
1interactions:
2- request:
3 body: client_name=mastodon.py+generated+test+app&scopes=read+write+follow+push&redirect_uris=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob
4 headers:
5 Accept:
6 - '*/*'
7 Accept-Encoding:
8 - gzip, deflate
9 Connection:
10 - keep-alive
11 Content-Length:
12 - '122'
13 Content-Type:
14 - application/x-www-form-urlencoded
15 User-Agent:
16 - python-requests/2.28.1
17 method: POST
18 uri: http://localhost:3000/api/v1/apps
19 response:
20 body:
21 string: '{"id":"4","name":"mastodon.py generated test app","website":null,"redirect_uri":"urn:ietf:wg:oauth:2.0:oob","client_id":"OueO_7-PGuI_wJwqr3gJCO3Mfp-CnB7ntLm2BDNgwoE","client_secret":"i74hCQQyscpk-AoXt8gL1lBYLlgsQw7r-vP_cuKWquA","vapid_key":"BFu6DBpfcm8_h8gm3rHUkfaOLg7azvYN_auFI4KcNuh5SLBVMhTkKKvUaLENtA_c6v5Hmrucvh0WwsN1o9NFQRU="}'
22 headers:
23 Cache-Control:
24 - no-store
25 Content-Security-Policy:
26 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src
27 ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000;
28 style-src ''self'' http://localhost:3000 ''nonce-eWGkzakxkoJqETI+J7AOfA=='';
29 media-src ''self'' https: data: http://localhost:3000; frame-src ''self''
30 https:; manifest-src ''self'' http://localhost:3000; connect-src ''self''
31 data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000
32 ws://localhost:3035 http://localhost:3035; script-src ''self'' ''unsafe-inline''
33 ''unsafe-eval'' http://localhost:3000; child-src ''self'' blob: http://localhost:3000;
34 worker-src ''self'' blob: http://localhost:3000'
35 Content-Type:
36 - application/json; charset=utf-8
37 ETag:
38 - W/"e57c57d0ecbadb4122581beb6057bf7b"
39 Referrer-Policy:
40 - strict-origin-when-cross-origin
41 Transfer-Encoding:
42 - chunked
43 Vary:
44 - Accept, Origin
45 X-Content-Type-Options:
46 - nosniff
47 X-Download-Options:
48 - noopen
49 X-Frame-Options:
50 - SAMEORIGIN
51 X-Permitted-Cross-Domain-Policies:
52 - none
53 X-Request-Id:
54 - c5d33842-2156-4850-ac91-154f71f72d2e
55 X-Runtime:
56 - '0.017495'
57 X-XSS-Protection:
58 - 1; mode=block
59 status:
60 code: 200
61 message: OK
62- request:
63 body: null
64 headers:
65 Accept:
66 - '*/*'
67 Accept-Encoding:
68 - gzip, deflate
69 Connection:
70 - keep-alive
71 User-Agent:
72 - mastodonpy
73 method: GET
74 uri: http://localhost:3000/api/v1/instance/
75 response:
76 body:
77 string: '{"uri":"localhost:3000","title":"Mastodon","short_description":"","description":"","email":"","version":"4.0.0rc2","urls":{"streaming_api":"ws://localhost:4000"},"stats":{"user_count":4,"status_count":5,"domain_count":0},"thumbnail":"http://localhost:3000/packs/media/images/preview-6399aebd96ccf025654e2977454f168f.png","languages":["en"],"registrations":true,"approval_required":false,"invites_enabled":true,"configuration":{"accounts":{"max_featured_tags":10},"statuses":{"max_characters":500,"max_media_attachments":4,"characters_reserved_per_url":23},"media_attachments":{"supported_mime_types":["image/jpeg","image/png","image/gif","image/heic","image/heif","image/webp","image/avif","video/webm","video/mp4","video/quicktime","video/ogg","audio/wave","audio/wav","audio/x-wav","audio/x-pn-wave","audio/vnd.wave","audio/ogg","audio/vorbis","audio/mpeg","audio/mp3","audio/webm","audio/flac","audio/aac","audio/m4a","audio/x-m4a","audio/mp4","audio/3gpp","video/x-ms-asf"],"image_size_limit":10485760,"image_matrix_limit":16777216,"video_size_limit":41943040,"video_frame_rate_limit":60,"video_matrix_limit":2304000},"polls":{"max_options":4,"max_characters_per_option":50,"min_expiration":300,"max_expiration":2629746}},"contact_account":null,"rules":[]}'
78 headers:
79 Cache-Control:
80 - max-age=180, public
81 Content-Security-Policy:
82 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src
83 ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000;
84 style-src ''self'' http://localhost:3000 ''nonce-pTVYgmBqNUhkaog/3BIWrg=='';
85 media-src ''self'' https: data: http://localhost:3000; frame-src ''self''
86 https:; manifest-src ''self'' http://localhost:3000; connect-src ''self''
87 data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000
88 ws://localhost:3035 http://localhost:3035; script-src ''self'' ''unsafe-inline''
89 ''unsafe-eval'' http://localhost:3000; child-src ''self'' blob: http://localhost:3000;
90 worker-src ''self'' blob: http://localhost:3000'
91 Content-Type:
92 - application/json; charset=utf-8
93 Date:
94 - Sat, 19 Nov 2022 00:05:11 GMT
95 ETag:
96 - W/"58e74f5c697f043d86089eae87509b84"
97 Referrer-Policy:
98 - strict-origin-when-cross-origin
99 Transfer-Encoding:
100 - chunked
101 Vary:
102 - Accept, Origin
103 X-Content-Type-Options:
104 - nosniff
105 X-Download-Options:
106 - noopen
107 X-Frame-Options:
108 - SAMEORIGIN
109 X-Permitted-Cross-Domain-Policies:
110 - none
111 X-Request-Id:
112 - 3f3580e9-a01c-4cb3-a8ff-e933a5b0a878
113 X-Runtime:
114 - '0.038202'
115 X-XSS-Protection:
116 - 1; mode=block
117 status:
118 code: 200
119 message: OK
120- request:
121 body: scope=read+write+follow+push&client_id=OueO_7-PGuI_wJwqr3gJCO3Mfp-CnB7ntLm2BDNgwoE&client_secret=i74hCQQyscpk-AoXt8gL1lBYLlgsQw7r-vP_cuKWquA&grant_type=client_credentials
122 headers:
123 Accept:
124 - '*/*'
125 Accept-Encoding:
126 - gzip, deflate
127 Connection:
128 - keep-alive
129 Content-Length:
130 - '170'
131 Content-Type:
132 - application/x-www-form-urlencoded
133 User-Agent:
134 - mastodonpy
135 method: POST
136 uri: http://localhost:3000/oauth/token
137 response:
138 body:
139 string: '{"access_token":"dDfMnIWbtYShiuOouwPaH1j8ZzGRdcg39Ns0nV5jXpo","token_type":"Bearer","scope":"read
140 write follow push","created_at":1668816311}'
141 headers:
142 Cache-Control:
143 - no-store
144 Content-Security-Policy:
145 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src
146 ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000;
147 style-src ''self'' http://localhost:3000 ''nonce-2oP2TTFLzbSaiZa7hgho0w=='';
148 media-src ''self'' https: data: http://localhost:3000; frame-src ''self''
149 https:; manifest-src ''self'' http://localhost:3000; connect-src ''self''
150 data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000
151 ws://localhost:3035 http://localhost:3035; script-src ''self'' ''unsafe-inline''
152 ''unsafe-eval'' http://localhost:3000; child-src ''self'' blob: http://localhost:3000;
153 worker-src ''self'' blob: http://localhost:3000'
154 Content-Type:
155 - application/json; charset=utf-8
156 ETag:
157 - W/"d29d21f6cdf89562d22826c8794a7259"
158 Pragma:
159 - no-cache
160 Referrer-Policy:
161 - strict-origin-when-cross-origin
162 Transfer-Encoding:
163 - chunked
164 Vary:
165 - Accept, Origin
166 X-Content-Type-Options:
167 - nosniff
168 X-Download-Options:
169 - noopen
170 X-Frame-Options:
171 - SAMEORIGIN
172 X-Permitted-Cross-Domain-Policies:
173 - none
174 X-Request-Id:
175 - 10f9efb8-85eb-4b30-ad16-9656fe53fd44
176 X-Runtime:
177 - '0.022478'
178 X-XSS-Protection:
179 - 1; mode=block
180 status:
181 code: 200
182 message: OK
183- request:
184 body: username=coolguy73878&password=&email=email%40localhost73878&locale=en&client_id=OueO_7-PGuI_wJwqr3gJCO3Mfp-CnB7ntLm2BDNgwoE&client_secret=i74hCQQyscpk-AoXt8gL1lBYLlgsQw7r-vP_cuKWquA
185 headers:
186 Accept:
187 - '*/*'
188 Accept-Encoding:
189 - gzip, deflate
190 Authorization:
191 - Bearer dDfMnIWbtYShiuOouwPaH1j8ZzGRdcg39Ns0nV5jXpo
192 Connection:
193 - keep-alive
194 Content-Length:
195 - '182'
196 Content-Type:
197 - application/x-www-form-urlencoded
198 User-Agent:
199 - mastodonpy
200 method: POST
201 uri: http://localhost:3000/api/v1/accounts
202 response:
203 body:
204 string: '{"error":"Validation failed: Password can''t be blank, Service agreement
205 must be accepted","details":{"password":[{"error":"ERR_BLANK","description":"can''t
206 be blank"}],"agreement":[{"error":"ERR_ACCEPTED","description":"must be accepted"}]}}'
207 headers:
208 Cache-Control:
209 - no-store
210 Content-Security-Policy:
211 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src
212 ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000;
213 style-src ''self'' http://localhost:3000 ''nonce-OtVYUk9hlx5v/TcbXUduUA=='';
214 media-src ''self'' https: data: http://localhost:3000; frame-src ''self''
215 https:; manifest-src ''self'' http://localhost:3000; connect-src ''self''
216 data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000
217 ws://localhost:3035 http://localhost:3035; script-src ''self'' ''unsafe-inline''
218 ''unsafe-eval'' http://localhost:3000; child-src ''self'' blob: http://localhost:3000;
219 worker-src ''self'' blob: http://localhost:3000'
220 Content-Type:
221 - application/json; charset=utf-8
222 Referrer-Policy:
223 - strict-origin-when-cross-origin
224 Transfer-Encoding:
225 - chunked
226 Vary:
227 - Accept, Origin
228 X-Content-Type-Options:
229 - nosniff
230 X-Download-Options:
231 - noopen
232 X-Frame-Options:
233 - SAMEORIGIN
234 X-Permitted-Cross-Domain-Policies:
235 - none
236 X-Request-Id:
237 - 48f3d7ec-0b4f-48ce-bf0c-acbec7479c71
238 X-Runtime:
239 - '0.561200'
240 X-XSS-Protection:
241 - 1; mode=block
242 status:
243 code: 422
244 message: Unprocessable Entity
245version: 1
Powered by cgit v1.2.3 (git 2.41.0)