aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cassettes/test_media_update.yaml')
-rw-r--r--tests/cassettes/test_media_update.yaml238
1 files changed, 182 insertions, 56 deletions
diff --git a/tests/cassettes/test_media_update.yaml b/tests/cassettes/test_media_update.yaml
index cf0b32e..9393924 100644
--- a/tests/cassettes/test_media_update.yaml
+++ b/tests/cassettes/test_media_update.yaml
@@ -1,13 +1,73 @@
1interactions: 1interactions:
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":1,"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-oXXAE09Lh1X66GUUalQOkg=='';
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/"a17de89b698f0c42f267e69340e11e47"
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 - 1a956d97-b4a5-4e2a-9d18-3fd0cb8e36c9
55 X-Runtime:
56 - '0.013517'
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 LS0xMjkyZjA0MzE0ZWY0ZTI5YThmYWRhZGY3MTZmZTBhOA0KQ29udGVudC1EaXNwb3NpdGlvbjog 64 LS02ZGNiNWQwNGNkZTI5NzZkZmZkNDNmYTIzNjk1NTFlNA0KQ29udGVudC1EaXNwb3NpdGlvbjog
5 Zm9ybS1kYXRhOyBuYW1lPSJkZXNjcmlwdGlvbiINCg0KSm9obiBMZW5ub24gZG9pbmcgYSBmdW5u 65 Zm9ybS1kYXRhOyBuYW1lPSJkZXNjcmlwdGlvbiINCg0KSm9obiBMZW5ub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MAKQA5YWNzcEFQUEwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPbWAAEAAAAA0y1sY21zAAAA
13 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKZGVzYwAAAPwAAABe 73 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKZGVzYwAAAPwAAABe
@@ -943,63 +1003,129 @@ interactions:
943 qYg3CP1hg5XagwuSZZej1N96VKgeHKRZSii9BM7fep2iK8u6Y69PxSpUVZtsdoSiQO3N/mozLhcI 1003 qYg3CP1hg5XagwuSZZej1N96VKgeHKRZSii9BM7fep2iK8u6Y69PxSpUVZtsdoSiQO3N/mozLhcI
944 xMSN89s+KVKgU4XMHLHOFF7LVZRJrFV22pUqBoKKIKucrmmTAxMZfilSoFO2xicuMnjFStYMZkHV 1004 xMSN89s+KVKgU4XMHLHOFF7LVZRJrFV22pUqBoKKIKucrmmTAxMZfilSoFO2xicuMnjFStYMZkHV
945 3XP4pUqC5Zbdy3MwJvu7U0AjASTLfOy9aVKgjPC5Yj9imCTIjyrGTjBn9aVKgY09xujjo55uzvSp 1005 3XP4pUqC5Zbdy3MwJvu7U0AjASTLfOy9aVKgjPC5Yj9imCTIjyrGTjBn9aVKgY09xujjo55uzvSp
946 UqD/2Q0KLS0xMjkyZjA0MzE0ZWY0ZTI5YThmYWRhZGY3MTZmZTBhOC0tDQo= 1006 UqD/2Q0KLS02ZGNiNWQwNGNkZTI5NzZkZmZkNDNmYTIzNjk1NTFlNC0tDQo=
947 headers: 1007 headers:
948 Accept: ['*/*'] 1008 Accept:
949 Accept-Encoding: ['gzip, deflate'] 1009 - '*/*'
950 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN] 1010 Accept-Encoding:
951 Connection: [keep-alive] 1011 - gzip, deflate
952 Content-Length: ['53738'] 1012 Authorization:
953 Content-Type: [multipart/form-data; boundary=1292f04314ef4e29a8fadadf716fe0a8] 1013 - Bearer __MASTODON_PY_TEST_ACCESS_TOKEN
954 User-Agent: [python-requests/2.18.4] 1014 Connection:
1015 - keep-alive
1016 Content-Length:
1017 - '53738'
1018 Content-Type:
1019 - multipart/form-data; boundary=6dcb5d04cde2976dffd43fa2369551e4
1020 User-Agent:
1021 - tests/v311
955 method: POST 1022 method: POST
956 uri: http://localhost:3000/api/v1/media 1023 uri: http://localhost:3000/api/v2/media
957 response: 1024 response:
958 body: {string: '{"id":"3","type":"image","url":"http://localhost/system/media_attachments/files/000/000/003/original/aa98af395e0fcdf2.jpeg?1582399728","preview_url":"http://localhost/system/media_attachments/files/000/000/003/small/aa98af395e0fcdf2.jpeg?1582399728","remote_url":null,"text_url":"http://localhost/media/aRhpj5TqOQi3Mw8m4Kg","meta":{"focus":{"x":-0.5,"y":0.3},"original":{"width":600,"height":600,"size":"600x600","aspect":1.0},"small":{"width":400,"height":400,"size":"400x400","aspect":1.0}},"description":"John 1025 body:
959 Lennon doing a funny walk","blurhash":"UGD9YgIo00j[NFofR%M{IURj%Ms;D%of%MR%"}'} 1026 string: '{"id":"109304275717926981","type":"image","url":"http://localhost:3000/system/media_attachments/files/109/304/275/717/926/981/original/6a91c9414954282c.jpg","preview_url":"http://localhost:3000/system/media_attachments/files/109/304/275/717/926/981/small/6a91c9414954282c.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},"focus":{"x":-0.5,"y":0.3}},"description":"John
1027 Lennon doing a funny walk","blurhash":"UGD9YhIn00j[NFofR%M{IURj%Ms;D%of%MR%"}'
960 headers: 1028 headers:
961 Cache-Control: ['no-cache, no-store'] 1029 Cache-Control:
962 Content-Type: [application/json; charset=utf-8] 1030 - no-store
963 Referrer-Policy: [strict-origin-when-cross-origin] 1031 Content-Security-Policy:
964 Transfer-Encoding: [chunked] 1032 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src
965 Vary: ['Accept-Encoding, Origin'] 1033 ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000;
966 X-Content-Type-Options: [nosniff] 1034 style-src ''self'' http://localhost:3000 ''nonce-QoJ/C9j4xlcKRmI28eJ97A=='';
967 X-Download-Options: [noopen] 1035 media-src ''self'' https: data: http://localhost:3000; frame-src ''self''
968 X-Frame-Options: [SAMEORIGIN] 1036 https:; manifest-src ''self'' http://localhost:3000; connect-src ''self''
969 X-Permitted-Cross-Domain-Policies: [none] 1037 data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000
970 X-Request-Id: [1a6b2fe2-de43-49b1-aaa4-016e21d92035] 1038 ws://localhost:3035 http://localhost:3035; script-src ''self'' ''unsafe-inline''
971 X-Runtime: ['0.356358'] 1039 ''unsafe-eval'' http://localhost:3000; child-src ''self'' blob: http://localhost:3000;
972 X-XSS-Protection: [1; mode=block] 1040 worker-src ''self'' blob: http://localhost:3000'
973 content-length: ['590'] 1041 Content-Type:
974 status: {code: 200, message: OK} 1042 - application/json; charset=utf-8
1043 ETag:
1044 - W/"137f5730a5bb73cb17efb13d81c255aa"
1045 Referrer-Policy:
1046 - strict-origin-when-cross-origin
1047 Transfer-Encoding:
1048 - chunked
1049 Vary:
1050 - Accept, Origin
1051 X-Content-Type-Options:
1052 - nosniff
1053 X-Download-Options:
1054 - noopen
1055 X-Frame-Options:
1056 - SAMEORIGIN
1057 X-Permitted-Cross-Domain-Policies:
1058 - none
1059 X-Request-Id:
1060 - 58aac5f0-ec17-44a3-adc1-106c9b697d71
1061 X-Runtime:
1062 - '0.133905'
1063 X-XSS-Protection:
1064 - 1; mode=block
1065 status:
1066 code: 200
1067 message: OK
975- request: 1068- request:
976 body: focus=0.69%2C0.69&description=John+Lennon+doing+a+cool+walk 1069 body: description=John+Lennon+doing+a+cool+walk&focus=0.69%2C0.69
977 headers: 1070 headers:
978 Accept: ['*/*'] 1071 Accept:
979 Accept-Encoding: ['gzip, deflate'] 1072 - '*/*'
980 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN] 1073 Accept-Encoding:
981 Connection: [keep-alive] 1074 - gzip, deflate
982 Content-Length: ['59'] 1075 Authorization:
983 Content-Type: [application/x-www-form-urlencoded] 1076 - Bearer __MASTODON_PY_TEST_ACCESS_TOKEN
984 User-Agent: [python-requests/2.18.4] 1077 Connection:
1078 - keep-alive
1079 Content-Length:
1080 - '59'
1081 Content-Type:
1082 - application/x-www-form-urlencoded
1083 User-Agent:
1084 - tests/v311
985 method: PUT 1085 method: PUT
986 uri: http://localhost:3000/api/v1/media/3 1086 uri: http://localhost:3000/api/v1/media/109304275717926981
987 response: 1087 response:
988 body: {string: '{"id":"3","type":"image","url":"http://localhost/system/media_attachments/files/000/000/003/original/aa98af395e0fcdf2.jpeg?1582399728","preview_url":"http://localhost/system/media_attachments/files/000/000/003/small/aa98af395e0fcdf2.jpeg?1582399728","remote_url":null,"text_url":"http://localhost/media/aRhpj5TqOQi3Mw8m4Kg","meta":{"focus":{"x":0.69,"y":0.69},"original":{"width":600,"height":600,"size":"600x600","aspect":1.0},"small":{"width":400,"height":400,"size":"400x400","aspect":1.0}},"description":"John 1088 body:
989 Lennon doing a cool walk","blurhash":"UGD9YgIo00j[NFofR%M{IURj%Ms;D%of%MR%"}'} 1089 string: '{"id":"109304275717926981","type":"image","url":"http://localhost:3000/system/media_attachments/files/109/304/275/717/926/981/original/6a91c9414954282c.jpg","preview_url":"http://localhost:3000/system/media_attachments/files/109/304/275/717/926/981/small/6a91c9414954282c.jpg","remote_url":null,"preview_remote_url":null,"text_url":null,"meta":{"focus":{"x":0.69,"y":0.69},"original":{"width":600,"height":600,"size":"600x600","aspect":1.0},"small":{"width":480,"height":480,"size":"480x480","aspect":1.0}},"description":"John
1090 Lennon doing a cool walk","blurhash":"UGD9YhIn00j[NFofR%M{IURj%Ms;D%of%MR%"}'
990 headers: 1091 headers:
991 Cache-Control: ['no-cache, no-store'] 1092 Cache-Control:
992 Content-Type: [application/json; charset=utf-8] 1093 - no-store
993 Referrer-Policy: [strict-origin-when-cross-origin] 1094 Content-Security-Policy:
994 Transfer-Encoding: [chunked] 1095 - 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src
995 Vary: ['Accept-Encoding, Origin'] 1096 ''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000;
996 X-Content-Type-Options: [nosniff] 1097 style-src ''self'' http://localhost:3000 ''nonce-gK1rbRIFJANVp1EWSQZqdA=='';
997 X-Download-Options: [noopen] 1098 media-src ''self'' https: data: http://localhost:3000; frame-src ''self''
998 X-Frame-Options: [SAMEORIGIN] 1099 https:; manifest-src ''self'' http://localhost:3000; connect-src ''self''
999 X-Permitted-Cross-Domain-Policies: [none] 1100 data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000
1000 X-Request-Id: [509a16dd-89ca-4ad0-8a01-cfdb3030d37c] 1101 ws://localhost:3035 http://localhost:3035; script-src ''self'' ''unsafe-inline''
1001 X-Runtime: ['0.041738'] 1102 ''unsafe-eval'' http://localhost:3000; child-src ''self'' blob: http://localhost:3000;
1002 X-XSS-Protection: [1; mode=block] 1103 worker-src ''self'' blob: http://localhost:3000'
1003 content-length: ['590'] 1104 Content-Type:
1004 status: {code: 200, message: OK} 1105 - application/json; charset=utf-8
1106 ETag:
1107 - W/"2980ac39ec2bdffb36e9f9ab6d9613aa"
1108 Referrer-Policy:
1109 - strict-origin-when-cross-origin
1110 Transfer-Encoding:
1111 - chunked
1112 Vary:
1113 - Accept, Origin
1114 X-Content-Type-Options:
1115 - nosniff
1116 X-Download-Options:
1117 - noopen
1118 X-Frame-Options:
1119 - SAMEORIGIN
1120 X-Permitted-Cross-Domain-Policies:
1121 - none
1122 X-Request-Id:
1123 - 770a4f6b-b8c0-42d0-8cd8-809f0f5ac474
1124 X-Runtime:
1125 - '0.013655'
1126 X-XSS-Protection:
1127 - 1; mode=block
1128 status:
1129 code: 200
1130 message: OK
1005version: 1 1131version: 1
Powered by cgit v1.2.3 (git 2.41.0)