diff options
Diffstat (limited to 'tests/cassettes/test_stream_direct.yaml')
-rw-r--r-- | tests/cassettes/test_stream_direct.yaml | 202 |
1 files changed, 119 insertions, 83 deletions
diff --git a/tests/cassettes/test_stream_direct.yaml b/tests/cassettes/test_stream_direct.yaml index 07a860f..abd2d21 100644 --- a/tests/cassettes/test_stream_direct.yaml +++ b/tests/cassettes/test_stream_direct.yaml | |||
@@ -2,97 +2,133 @@ interactions: | |||
2 | - request: | 2 | - request: |
3 | body: null | 3 | body: null |
4 | headers: | 4 | headers: |
5 | Accept: ['*/*'] | 5 | Accept: |
6 | Accept-Encoding: ['gzip, deflate'] | 6 | - '*/*' |
7 | Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN] | 7 | Accept-Encoding: |
8 | Connection: [keep-alive] | 8 | - gzip, deflate |
9 | User-Agent: [python-requests/2.18.4] | 9 | Authorization: |
10 | - Bearer __MASTODON_PY_TEST_ACCESS_TOKEN | ||
11 | Connection: | ||
12 | - keep-alive | ||
13 | User-Agent: | ||
14 | - tests/v311 | ||
10 | method: GET | 15 | method: GET |
11 | uri: http://localhost:3000/api/v1/instance/ | 16 | uri: http://localhost:3000/api/v1/instance/ |
12 | response: | 17 | response: |
13 | body: {string: '{"uri":"localhost","title":"Mastodon","short_description":"","description":"","email":"","version":"3.1.1","urls":{"streaming_api":"ws://localhost:4000"},"stats":{"user_count":3,"status_count":5,"domain_count":0},"thumbnail":"http://localhost/packs/media/images/preview-9a17d32fc48369e8ccd910a75260e67d.jpg","languages":["en"],"registrations":true,"approval_required":false,"contact_account":null}'} | 18 | body: |
19 | string: '{"uri":"localhost:3000","title":"Mastodon","short_description":"","description":"","email":"","version":"4.0.0rc1","urls":{"streaming_api":"ws://localhost:4000"},"stats":{"user_count":4,"status_count":15,"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":[]}' | ||
14 | headers: | 20 | headers: |
15 | Cache-Control: ['max-age=180, public'] | 21 | Cache-Control: |
16 | Content-Type: [application/json; charset=utf-8] | 22 | - max-age=180, public |
17 | Date: ['Sat, 22 Feb 2020 19:30:30 GMT'] | 23 | Content-Security-Policy: |
18 | ETag: [W/"51587391c411617410e169d0ce505880"] | 24 | - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src |
19 | Referrer-Policy: [strict-origin-when-cross-origin] | 25 | ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; |
20 | Transfer-Encoding: [chunked] | 26 | style-src ''self'' http://localhost:3000 ''nonce-MmIvPhY8R3slN53SGtDgOw==''; |
21 | Vary: ['Accept-Encoding, Origin'] | 27 | media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' |
22 | X-Content-Type-Options: [nosniff] | 28 | https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' |
23 | X-Download-Options: [noopen] | 29 | data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 |
24 | X-Frame-Options: [SAMEORIGIN] | 30 | ws://localhost:3035 http://localhost:3035; script-src ''self'' ''unsafe-inline'' |
25 | X-Permitted-Cross-Domain-Policies: [none] | 31 | ''unsafe-eval'' http://localhost:3000; child-src ''self'' blob: http://localhost:3000; |
26 | X-Request-Id: [aeccbf84-349a-4394-be58-83af49fd2a57] | 32 | worker-src ''self'' blob: http://localhost:3000' |
27 | X-Runtime: ['0.055290'] | 33 | Content-Type: |
28 | X-XSS-Protection: [1; mode=block] | 34 | - application/json; charset=utf-8 |
29 | content-length: ['397'] | 35 | Date: |
30 | status: {code: 200, message: OK} | 36 | - Mon, 07 Nov 2022 20:27:56 GMT |
37 | ETag: | ||
38 | - W/"fafcb5ea1f4109317c0ec8433c248a14" | ||
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 | - ef816ca9-472b-490c-b55a-7db3a4254698 | ||
55 | X-Runtime: | ||
56 | - '0.013663' | ||
57 | X-XSS-Protection: | ||
58 | - 1; mode=block | ||
59 | status: | ||
60 | code: 200 | ||
61 | message: OK | ||
31 | - request: | 62 | - request: |
32 | body: visibility=direct&status=%40mastodonpy_test+todo+funny+text+here | 63 | body: status=%40mastodonpy_test+todo+funny+text+here&visibility=direct |
33 | headers: | 64 | headers: |
34 | Accept: ['*/*'] | 65 | Accept: |
35 | Accept-Encoding: ['gzip, deflate'] | 66 | - '*/*' |
36 | Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN_2] | 67 | Accept-Encoding: |
37 | Connection: [keep-alive] | 68 | - gzip, deflate |
38 | Content-Length: ['64'] | 69 | Authorization: |
39 | Content-Type: [application/x-www-form-urlencoded] | 70 | - Bearer __MASTODON_PY_TEST_ACCESS_TOKEN_2 |
40 | User-Agent: [python-requests/2.18.4] | 71 | Connection: |
72 | - keep-alive | ||
73 | Content-Length: | ||
74 | - '64' | ||
75 | Content-Type: | ||
76 | - application/x-www-form-urlencoded | ||
77 | User-Agent: | ||
78 | - tests/v311 | ||
41 | method: POST | 79 | method: POST |
42 | uri: http://localhost:3000/api/v1/statuses | 80 | uri: http://localhost:3000/api/v1/statuses |
43 | response: | 81 | response: |
44 | body: {string: '{"id":"103704155604374665","created_at":"2020-02-22T19:30:35.304Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"direct","language":"en","uri":"http://localhost/users/admin/statuses/103704155604374665","url":"http://localhost/@admin/103704155604374665","replies_count":0,"reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"content":"\u003cp\u003e\u003cspan | 82 | body: |
45 | class=\"h-card\"\u003e\u003ca href=\"http://localhost/@mastodonpy_test\" class=\"u-url | 83 | string: '{"id":"109304406436478981","created_at":"2022-11-07T20:28:01.417Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"direct","language":"en","uri":"http://localhost:3000/users/admin/statuses/109304406436478981","url":"http://localhost:3000/@admin/109304406436478981","replies_count":0,"reblogs_count":0,"favourites_count":0,"edited_at":null,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"content":"\u003cp\u003e\u003cspan |
46 | mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e | 84 | class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\" |
47 | todo funny text here\u003c/p\u003e","reblog":null,"application":{"name":"Mastodon.py | 85 | class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e |
48 | 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":3,"last_status_at":"2020-02-22","emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"1234567890123456","username":"mastodonpy_test","url":"http://localhost/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}'} | 86 | todo funny text here\u003c/p\u003e","filtered":[],"reblog":null,"application":{"name":"Mastodon.py |
87 | 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":9,"last_status_at":"2022-11-07","noindex":false,"emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"1234567890123456","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}' | ||
49 | headers: | 88 | headers: |
50 | Cache-Control: ['no-cache, no-store'] | 89 | Cache-Control: |
51 | Content-Type: [application/json; charset=utf-8] | 90 | - no-store |
52 | Referrer-Policy: [strict-origin-when-cross-origin] | 91 | Content-Security-Policy: |
53 | Transfer-Encoding: [chunked] | 92 | - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src |
54 | Vary: ['Accept-Encoding, Origin'] | 93 | ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; |
55 | X-Content-Type-Options: [nosniff] | 94 | style-src ''self'' http://localhost:3000 ''nonce-DqMY8D6ZzOF/QRsl0W/e7Q==''; |
56 | X-Download-Options: [noopen] | 95 | media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' |
57 | X-Frame-Options: [SAMEORIGIN] | 96 | https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' |
58 | X-Permitted-Cross-Domain-Policies: [none] | 97 | data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 |
59 | X-Request-Id: [eb31d98b-c1c6-4e75-b11a-3fc21f206b6b] | 98 | ws://localhost:3035 http://localhost:3035; script-src ''self'' ''unsafe-inline'' |
60 | X-Runtime: ['0.246356'] | 99 | ''unsafe-eval'' http://localhost:3000; child-src ''self'' blob: http://localhost:3000; |
61 | X-XSS-Protection: [1; mode=block] | 100 | worker-src ''self'' blob: http://localhost:3000' |
62 | content-length: ['1569'] | 101 | Content-Type: |
63 | status: {code: 200, message: OK} | 102 | - application/json; charset=utf-8 |
64 | - request: | 103 | ETag: |
65 | body: null | 104 | - W/"a83e0800c490595538b11525df685367" |
66 | headers: | 105 | Referrer-Policy: |
67 | Accept: ['*/*'] | 106 | - strict-origin-when-cross-origin |
68 | Accept-Encoding: ['gzip, deflate'] | 107 | Transfer-Encoding: |
69 | Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN] | 108 | - chunked |
70 | Connection: [keep-alive] | 109 | Vary: |
71 | User-Agent: [python-requests/2.18.4] | 110 | - Accept, Origin |
72 | method: GET | 111 | X-Content-Type-Options: |
73 | uri: http://localhost:4000/api/v1/streaming/direct | 112 | - nosniff |
74 | response: | 113 | X-Download-Options: |
75 | body: {string: ':) | 114 | - noopen |
76 | 115 | X-Frame-Options: | |
77 | event: conversation | 116 | - SAMEORIGIN |
78 | 117 | X-Permitted-Cross-Domain-Policies: | |
79 | data: {"id":"4","unread":true,"accounts":[{"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":"<p></p>","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":3,"last_status_at":"2020-02-22","emojis":[],"fields":[]}],"last_status":{"id":"103704155604374665","created_at":"2020-02-22T19:30:35.304Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"direct","language":"en","uri":"http://localhost/users/admin/statuses/103704155604374665","url":"http://localhost/@admin/103704155604374665","replies_count":0,"reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"bookmarked":false,"content":"<p><span | 118 | - none |
80 | class=\"h-card\"><a href=\"http://localhost/@mastodonpy_test\" class=\"u-url | 119 | X-RateLimit-Limit: |
81 | mention\">@<span>mastodonpy_test</span></a></span> todo funny text here</p>","reblog":null,"application":{"name":"Mastodon.py | 120 | - '300' |
82 | 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":"<p></p>","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":3,"last_status_at":"2020-02-22","emojis":[],"fields":[]},"media_attachments":[],"mentions":[{"id":"1234567890123456","username":"mastodonpy_test","url":"http://localhost/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[],"card":null,"poll":null}} | 121 | X-RateLimit-Remaining: |
83 | 122 | - '282' | |
84 | 123 | X-RateLimit-Reset: | |
85 | :'} | 124 | - '2022-11-07T21:00:00.451033Z' |
86 | headers: | 125 | X-Request-Id: |
87 | Access-Control-Allow-Headers: ['Authorization, Accept, Cache-Control'] | 126 | - d73db2a8-b712-4d6c-bb89-db9c068065be |
88 | Access-Control-Allow-Methods: ['GET, OPTIONS'] | 127 | X-Runtime: |
89 | Access-Control-Allow-Origin: ['*'] | 128 | - '0.047868' |
90 | Cache-Control: [no-store] | 129 | X-XSS-Protection: |
91 | Connection: [keep-alive] | 130 | - 1; mode=block |
92 | Content-Type: [text/event-stream] | 131 | status: |
93 | Date: ['Sat, 22 Feb 2020 19:30:30 GMT'] | 132 | code: 200 |
94 | Transfer-Encoding: [chunked] | 133 | message: OK |
95 | X-Powered-By: [Express] | ||
96 | X-Request-Id: [254a2c3c-5131-44b1-ad76-128a348475c9] | ||
97 | status: {code: 200, message: OK} | ||
98 | version: 1 | 134 | version: 1 |