Mastodon.py/tests/cassettes/test_polls.yaml

332 wiersze
12 KiB
YAML

interactions:
- request:
body: '{"status": "nice", "poll": {"options": ["four twenty", "sixty-nine"], "expires_in":
300, "multiple": true, "hide_totals": false}}'
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Authorization:
- Bearer __MASTODON_PY_TEST_ACCESS_TOKEN_2
Connection:
- keep-alive
Content-Length:
- '129'
Content-Type:
- application/json
User-Agent:
- tests/v311
method: POST
uri: http://localhost:3000/api/v1/statuses
response:
body:
string: '{"id":"111912699554287497","created_at":"2024-02-11T11:51:15.921Z","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/111912699554287497","url":"http://localhost:3000/@admin/111912699554287497","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
test suite","website":null},"account":{"id":"111912686719071190","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2024-02-11T00: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":1,"last_status_at":"2024-02-11","noindex":false,"emojis":[],"roles":[{"id":"3","name":"Owner","color":""}],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":{"id":"1","expires_at":"2024-02-11T11:56:15.918Z","expired":false,"multiple":true,"votes_count":0,"voters_count":0,"voted":true,"own_votes":[],"options":[{"title":"four
twenty","votes_count":0},{"title":"sixty-nine","votes_count":0}],"emojis":[]}}'
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/"75cfebff01f137c7e8048d31a9b44ea4"
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-RateLimit-Limit:
- '300'
X-RateLimit-Remaining:
- '291'
X-RateLimit-Reset:
- '2024-02-11T12:00:00.965474Z'
X-Request-Id:
- fa5dfe04-9f3d-4800-bc03-512d01bf1cf7
X-Runtime:
- '0.070101'
X-XSS-Protection:
- 1; mode=block
status:
code: 200
message: OK
- request:
body: choices%5B%5D=1
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Authorization:
- Bearer __MASTODON_PY_TEST_ACCESS_TOKEN
Connection:
- keep-alive
Content-Length:
- '15'
Content-Type:
- application/x-www-form-urlencoded
User-Agent:
- tests/v311
method: POST
uri: http://localhost:3000/api/v1/polls/1/votes
response:
body:
string: '{"id":"1","expires_at":"2024-02-11T11:56:15.918Z","expired":false,"multiple":true,"votes_count":1,"voters_count":1,"voted":true,"own_votes":[1],"options":[{"title":"four
twenty","votes_count":0},{"title":"sixty-nine","votes_count":1}],"emojis":[]}'
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/"7ec24adb21d32d6ca6714a78cbdd2bb4"
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:
- 30e2fd0f-be62-4cfc-b6e5-ad13e94c3ecb
X-Runtime:
- '0.051173'
X-XSS-Protection:
- 1; mode=block
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:
- tests/v311
method: GET
uri: http://localhost:3000/api/v1/polls/1
response:
body:
string: '{"id":"1","expires_at":"2024-02-11T11:56:15.918Z","expired":false,"multiple":true,"votes_count":1,"voters_count":1,"voted":true,"own_votes":[1],"options":[{"title":"four
twenty","votes_count":0},{"title":"sixty-nine","votes_count":1}],"emojis":[]}'
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/"7ec24adb21d32d6ca6714a78cbdd2bb4"
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:
- acb94a1a-f0a7-4b6c-ba7e-c7cd6ae987a5
X-Runtime:
- '0.018696'
X-XSS-Protection:
- 1; mode=block
status:
code: 200
message: OK
- request:
body: choices%5B%5D=0
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Authorization:
- Bearer __MASTODON_PY_TEST_ACCESS_TOKEN
Connection:
- keep-alive
Content-Length:
- '15'
Content-Type:
- application/x-www-form-urlencoded
User-Agent:
- tests/v311
method: POST
uri: http://localhost:3000/api/v1/polls/1/votes
response:
body:
string: '{"id":"1","expires_at":"2024-02-11T11:56:15.918Z","expired":false,"multiple":true,"votes_count":2,"voters_count":1,"voted":true,"own_votes":[1,0],"options":[{"title":"four
twenty","votes_count":1},{"title":"sixty-nine","votes_count":1}],"emojis":[]}'
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/"146d91afcf8c6948192f9a64d9c97770"
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:
- ab7b37d8-c586-448a-bfc9-98320575a576
X-Runtime:
- '0.037208'
X-XSS-Protection:
- 1; mode=block
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:
- tests/v311
method: GET
uri: http://localhost:3000/api/v1/polls/1
response:
body:
string: '{"id":"1","expires_at":"2024-02-11T11:56:15.918Z","expired":false,"multiple":true,"votes_count":2,"voters_count":1,"voted":true,"own_votes":[1,0],"options":[{"title":"four
twenty","votes_count":1},{"title":"sixty-nine","votes_count":1}],"emojis":[]}'
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/"146d91afcf8c6948192f9a64d9c97770"
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:
- 953e7056-a9e9-48c0-82d6-730e59122856
X-Runtime:
- '0.017469'
X-XSS-Protection:
- 1; mode=block
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- '*/*'
Accept-Encoding:
- gzip, deflate
Authorization:
- Bearer __MASTODON_PY_TEST_ACCESS_TOKEN_2
Connection:
- keep-alive
Content-Length:
- '0'
User-Agent:
- tests/v311
method: DELETE
uri: http://localhost:3000/api/v1/statuses/111912699554287497
response:
body:
string: '{"id":"111912699554287497","created_at":"2024-02-11T11:51:15.921Z","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/111912699554287497","url":"http://localhost:3000/@admin/111912699554287497","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"pinned":false,"text":"nice","filtered":[],"reblog":null,"application":{"name":"Mastodon.py
test suite","website":null},"account":{"id":"111912686719071190","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2024-02-11T00: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":0,"last_status_at":"2024-02-11","noindex":false,"emojis":[],"roles":[{"id":"3","name":"Owner","color":""}],"fields":[]},"media_attachments":[],"mentions":[],"tags":[],"emojis":[],"card":null,"poll":{"id":"1","expires_at":"2024-02-11T11:56:15.918Z","expired":false,"multiple":true,"votes_count":2,"voters_count":1,"voted":true,"own_votes":[],"options":[{"title":"four
twenty","votes_count":1},{"title":"sixty-nine","votes_count":1}],"emojis":[]}}'
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/"bcdb7548b190b1af9b8fa4f5492f68df"
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:
- 9e6d343a-07f6-47b7-8604-cea0d54e8836
X-Runtime:
- '0.039438'
X-XSS-Protection:
- 1; mode=block
status:
code: 200
message: OK
version: 1