Mastodon.py/tests/cassettes/test_app_account_create_invalid.yaml
2023-04-23 21:22:33 +03:00

222 lines
7.8 KiB
YAML

interactions:
- request:
body: client_name=mastodon.py+generated+test+app&scopes=read+write+follow+push&redirect_uris=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
Content-Length:
- '122'
Content-Type:
- application/x-www-form-urlencoded
User-Agent:
- mastodonpy
method: POST
uri: http://localhost:3000/api/v1/apps
response:
body:
string: '{"id":"3","name":"mastodon.py generated test app","website":null,"redirect_uri":"urn:ietf:wg:oauth:2.0:oob","client_id":"LTn8Mv-N06gLtTKALX01rXTYx34hsjVEkhL_Ho_27Jo","client_secret":"i2gkE6OawVqrSoHPolwFUX8AsDecdGEU4rtHYSAw4hM","vapid_key":"BFUhy7Am7hkYb7WSvLxKp_Vg2cdDKY3zX9SxxX-uMKGiFEr2DjHRuT3gv67bfJj-fxOPXMpV0FTFGCOh_1dmG4o="}'
headers:
Cache-Control:
- private, no-store
Content-Security-Policy:
- default-src 'none'; frame-ancestors 'none'; form-action 'none'
Content-Type:
- application/json; charset=utf-8
ETag:
- W/"b4b5d150ca2362fb8f005124eeb62019"
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:
- d2e19ba0-7355-45bf-9cae-25d7d8f3082e
X-Runtime:
- '0.016454'
X-XSS-Protection:
- 1; mode=block
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
User-Agent:
- mastodonpy
method: GET
uri: http://localhost:3000/api/v1/instance/
response:
body:
string: '{"uri":"localhost:3000","title":"Mastodon","short_description":"","description":"","email":"","version":"4.1.2","urls":{"streaming_api":"ws://localhost:4000"},"stats":{"user_count":4,"status_count":1,"domain_count":1},"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":[]}'
headers:
Cache-Control:
- max-age=180, public
Content-Security-Policy:
- default-src 'none'; frame-ancestors 'none'; form-action 'none'
Content-Type:
- application/json; charset=utf-8
Date:
- Sun, 23 Apr 2023 17:56:42 GMT
ETag:
- W/"98744cb6ec16cf70ab38874279e95e6c"
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:
- d49b18f2-5f02-4bd0-8d9e-6948fb1faebb
X-Runtime:
- '0.017280'
X-XSS-Protection:
- 1; mode=block
status:
code: 200
message: OK
- request:
body: scope=read+write+follow+push&client_id=LTn8Mv-N06gLtTKALX01rXTYx34hsjVEkhL_Ho_27Jo&client_secret=i2gkE6OawVqrSoHPolwFUX8AsDecdGEU4rtHYSAw4hM&grant_type=client_credentials
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Connection:
- keep-alive
Content-Length:
- '170'
Content-Type:
- application/x-www-form-urlencoded
User-Agent:
- mastodonpy
method: POST
uri: http://localhost:3000/oauth/token
response:
body:
string: '{"access_token":"m9QnQOrYIpyCDMRqtAmM5S3l8LsCQfhn1jJPUUFpP2U","token_type":"Bearer","scope":"read
write follow push","created_at":1682272603}'
headers:
Cache-Control:
- no-store
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-F4sofqm/fbcIN3x/qUCFvQ=='';
media-src ''self'' https: data: http://localhost:3000; frame-src ''self''
https:; manifest-src ''self'' http://localhost:3000; form-action ''self'';
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
ETag:
- W/"37930ac90d72d8420b09cf51e9dc82ea"
Pragma:
- no-cache
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:
- 80112f82-db8b-4b26-abad-3d95ee16384b
X-Runtime:
- '0.013545'
X-XSS-Protection:
- 1; mode=block
status:
code: 200
message: OK
- request:
body: username=coolguy57898&password=&email=email%40localhost57898&locale=en&return_detailed_error=1&client_id=LTn8Mv-N06gLtTKALX01rXTYx34hsjVEkhL_Ho_27Jo&client_secret=i2gkE6OawVqrSoHPolwFUX8AsDecdGEU4rtHYSAw4hM
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Authorization:
- Bearer m9QnQOrYIpyCDMRqtAmM5S3l8LsCQfhn1jJPUUFpP2U
Connection:
- keep-alive
Content-Length:
- '206'
Content-Type:
- application/x-www-form-urlencoded
User-Agent:
- mastodonpy
method: POST
uri: http://localhost:3000/api/v1/accounts
response:
body:
string: '{"error":"Validation failed: Password can''t be blank, Service agreement
must be accepted","details":{"password":[{"error":"ERR_BLANK","description":"can''t
be blank"}],"agreement":[{"error":"ERR_ACCEPTED","description":"must be accepted"}]}}'
headers:
Cache-Control:
- private, no-store
Content-Security-Policy:
- default-src 'none'; frame-ancestors 'none'; form-action 'none'
Content-Type:
- application/json; charset=utf-8
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:
- 7516c246-a745-4080-962e-7b2577a19b2a
X-Runtime:
- '0.027381'
X-XSS-Protection:
- 1; mode=block
status:
code: 422
message: Unprocessable Entity
version: 1