diff options
Diffstat (limited to 'tests/cassettes/test_media_post_file.yaml')
-rw-r--r-- | tests/cassettes/test_media_post_file.yaml | 147 |
1 files changed, 120 insertions, 27 deletions
diff --git a/tests/cassettes/test_media_post_file.yaml b/tests/cassettes/test_media_post_file.yaml index 159cae1..6f5b36f 100644 --- a/tests/cassettes/test_media_post_file.yaml +++ b/tests/cassettes/test_media_post_file.yaml | |||
@@ -1,9 +1,69 @@ | |||
1 | interactions: | 1 | interactions: |
2 | - request: | 2 | - request: |
3 | body: null | ||
4 | headers: | ||
5 | Accept: | ||
6 | - '*/*' | ||
7 | Accept-Encoding: | ||
8 | - gzip, deflate | ||
9 | Authorization: | ||
10 | - Bearer __MASTODON_PY_TEST_ACCESS_TOKEN | ||
11 | Connection: | ||
12 | - keep-alive | ||
13 | User-Agent: | ||
14 | - tests/v311 | ||
15 | method: GET | ||
16 | uri: http://localhost:3000/api/v1/instance/ | ||
17 | response: | ||
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":0,"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":[]}' | ||
20 | headers: | ||
21 | Cache-Control: | ||
22 | - max-age=180, public | ||
23 | Content-Security-Policy: | ||
24 | - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src | ||
25 | ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; | ||
26 | style-src ''self'' http://localhost:3000 ''nonce-NkjUbSZNqSgwfuA6kaCQag==''; | ||
27 | media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' | ||
28 | https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' | ||
29 | data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 | ||
30 | ws://localhost:3035 http://localhost:3035; script-src ''self'' ''unsafe-inline'' | ||
31 | ''unsafe-eval'' http://localhost:3000; child-src ''self'' blob: http://localhost:3000; | ||
32 | worker-src ''self'' blob: http://localhost:3000' | ||
33 | Content-Type: | ||
34 | - application/json; charset=utf-8 | ||
35 | Date: | ||
36 | - Mon, 07 Nov 2022 19:54:46 GMT | ||
37 | ETag: | ||
38 | - W/"45319ebd79e4bcdb5bf907c47f95d0a1" | ||
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 | - b8a06111-f08b-49dc-8469-96e2e22baf38 | ||
55 | X-Runtime: | ||
56 | - '0.013629' | ||
57 | X-XSS-Protection: | ||
58 | - 1; mode=block | ||
59 | status: | ||
60 | code: 200 | ||
61 | message: OK | ||
62 | - request: | ||
3 | body: !!binary | | 63 | body: !!binary | |
4 | LS1iNzVkM2IxMzNmMjc0NGEyY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ts | 999 | fkRBtkgMCmGlSoojqYg3CP1hg5XagwuSZZej1N96VKgeHKRZSii9BM7fep2iK8u6Y69PxSpUVZts |
940 | doSiQO3N/mozLhcIxMSN89s+KVKgU4XMHLHOFF7LVZRJrFV22pUqBoKKIKucrmmTAxMZfilSoFO2 | 1000 | doSiQO3N/mozLhcIxMSN89s+KVKgU4XMHLHOFF7LVZRJrFV22pUqBoKKIKucrmmTAxMZfilSoFO2 |
941 | xicuMnjFStYMZkHV3XP4pUqC5Zbdy3MwJvu7U0AjASTLfOy9aVKgjPC5Yj9imCTIjyrGTjBn9aVK | 1001 | xicuMnjFStYMZkHV3XP4pUqC5Zbdy3MwJvu7U0AjASTLfOy9aVKgjPC5Yj9imCTIjyrGTjBn9aVK |
942 | gY09xujjo55uzvSpUqD/2Q0KLS1iNzVkM2IxMzNmMjc0NGEyYTNmZjU4OTIxZmUzMmUwZi0tDQo= | 1002 | gY09xujjo55uzvSpUqD/2Q0KLS02YTYyZjE5NDFiYWQ3ZWU3M2MxYmQ2YWViMjM2Mzc2ZC0tDQo= |
943 | headers: | 1003 | headers: |
944 | Accept: ['*/*'] | 1004 | Accept: |
945 | Accept-Encoding: ['gzip, deflate'] | 1005 | - '*/*' |
946 | Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN] | 1006 | Accept-Encoding: |
947 | Connection: [keep-alive] | 1007 | - gzip, deflate |
948 | Content-Length: ['53522'] | 1008 | Authorization: |
949 | Content-Type: [multipart/form-data; boundary=b75d3b133f2744a2a3ff58921fe32e0f] | 1009 | - Bearer __MASTODON_PY_TEST_ACCESS_TOKEN |
950 | User-Agent: [python-requests/2.18.4] | 1010 | Connection: |
1011 | - keep-alive | ||
1012 | Content-Length: | ||
1013 | - '53522' | ||
1014 | Content-Type: | ||
1015 | - multipart/form-data; boundary=6a62f1941bad7ee73c1bd6aeb236376d | ||
1016 | User-Agent: | ||
1017 | - tests/v311 | ||
951 | method: POST | 1018 | method: POST |
952 | uri: http://localhost:3000/api/v1/media | 1019 | uri: http://localhost:3000/api/v2/media |
953 | response: | 1020 | response: |
954 | body: {string: '{"id":"4","type":"image","url":"http://localhost/system/media_attachments/files/000/000/004/original/228cb203e7be91bc.jpeg?1582399729","preview_url":"http://localhost/system/media_attachments/files/000/000/004/small/228cb203e7be91bc.jpeg?1582399729","remote_url":null,"text_url":"http://localhost/media/snyAbfjK2uCc3K_tko8","meta":{"original":{"width":600,"height":600,"size":"600x600","aspect":1.0},"small":{"width":400,"height":400,"size":"400x400","aspect":1.0}},"description":null,"blurhash":"UGD9YgIo00j[NFofR%M{IURj%Ms;D%of%MR%"}'} | 1021 | body: |
1022 | string: '{"id":"109304275729926991","type":"image","url":"http://localhost:3000/system/media_attachments/files/109/304/275/729/926/991/original/10d6e8a300c429c7.jpg","preview_url":"http://localhost:3000/system/media_attachments/files/109/304/275/729/926/991/small/10d6e8a300c429c7.jpg","remote_url":null,"preview_remote_url":null,"text_url":null,"meta":{"original":{"width":600,"height":600,"size":"600x600","aspect":1.0},"small":{"width":480,"height":480,"size":"480x480","aspect":1.0}},"description":null,"blurhash":"UGD9YhIn00j[NFofR%M{IURj%Ms;D%of%MR%"}' | ||
955 | headers: | 1023 | headers: |
956 | Cache-Control: ['no-cache, no-store'] | 1024 | Cache-Control: |
957 | Content-Type: [application/json; charset=utf-8] | 1025 | - no-store |
958 | Referrer-Policy: [strict-origin-when-cross-origin] | 1026 | Content-Security-Policy: |
959 | Transfer-Encoding: [chunked] | 1027 | - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src |
960 | Vary: ['Accept-Encoding, Origin'] | 1028 | ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000; |
961 | X-Content-Type-Options: [nosniff] | 1029 | style-src ''self'' http://localhost:3000 ''nonce-VKJJDf/n3lUS1wYxX4PWdQ==''; |
962 | X-Download-Options: [noopen] | 1030 | media-src ''self'' https: data: http://localhost:3000; frame-src ''self'' |
963 | X-Frame-Options: [SAMEORIGIN] | 1031 | https:; manifest-src ''self'' http://localhost:3000; connect-src ''self'' |
964 | X-Permitted-Cross-Domain-Policies: [none] | 1032 | data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000 |
965 | X-Request-Id: [32159763-1dec-4298-ba11-e38a1f5151c8] | 1033 | ws://localhost:3035 http://localhost:3035; script-src ''self'' ''unsafe-inline'' |
966 | X-Runtime: ['0.435108'] | 1034 | ''unsafe-eval'' http://localhost:3000; child-src ''self'' blob: http://localhost:3000; |
967 | X-XSS-Protection: [1; mode=block] | 1035 | worker-src ''self'' blob: http://localhost:3000' |
968 | content-length: ['535'] | 1036 | Content-Type: |
969 | status: {code: 200, message: OK} | 1037 | - application/json; charset=utf-8 |
1038 | ETag: | ||
1039 | - W/"7168c36c59fe751e5002687ff4e4b2c3" | ||
1040 | Referrer-Policy: | ||
1041 | - strict-origin-when-cross-origin | ||
1042 | Transfer-Encoding: | ||
1043 | - chunked | ||
1044 | Vary: | ||
1045 | - Accept, Origin | ||
1046 | X-Content-Type-Options: | ||
1047 | - nosniff | ||
1048 | X-Download-Options: | ||
1049 | - noopen | ||
1050 | X-Frame-Options: | ||
1051 | - SAMEORIGIN | ||
1052 | X-Permitted-Cross-Domain-Policies: | ||
1053 | - none | ||
1054 | X-Request-Id: | ||
1055 | - 6b40699f-5296-407d-b5ac-bf2a4228fbd6 | ||
1056 | X-Runtime: | ||
1057 | - '0.139682' | ||
1058 | X-XSS-Protection: | ||
1059 | - 1; mode=block | ||
1060 | status: | ||
1061 | code: 200 | ||
1062 | message: OK | ||
970 | version: 1 | 1063 | version: 1 |