From 087fb249dad981be4dfbfea13a842bfcc1cd8fd7 Mon Sep 17 00:00:00 2001 From: Lorenz Diener Date: Mon, 30 Jul 2018 20:25:25 +0200 Subject: Fix tests --- tests/cassettes/test_list_add_remove_account.yaml | 138 +++++++++++----------- 1 file changed, 70 insertions(+), 68 deletions(-) (limited to 'tests/cassettes/test_list_add_remove_account.yaml') diff --git a/tests/cassettes/test_list_add_remove_account.yaml b/tests/cassettes/test_list_add_remove_account.yaml index 96d8eb0..c70cfd0 100644 --- a/tests/cassettes/test_list_add_remove_account.yaml +++ b/tests/cassettes/test_list_add_remove_account.yaml @@ -12,11 +12,11 @@ interactions: method: POST uri: http://localhost:3000/api/v1/lists response: - body: {string: '{"id":"8","title":"ham burglars"}'} + body: {string: '{"id":"11","title":"ham burglars"}'} headers: Cache-Control: ['max-age=0, private, must-revalidate'] Content-Type: [application/json; charset=utf-8] - ETag: [W/"fa515662bd5f01d24648b40d4019aad1"] + ETag: [W/"2e1510bf7e5d27be138dad5ee706a95c"] Referrer-Policy: [strict-origin-when-cross-origin] Transfer-Encoding: [chunked] Vary: ['Accept-Encoding, Origin'] @@ -24,10 +24,10 @@ interactions: X-Download-Options: [noopen] X-Frame-Options: [SAMEORIGIN] X-Permitted-Cross-Domain-Policies: [none] - X-Request-Id: [6f26ef1b-5e51-4cbd-b165-08bd0ba19035] - X-Runtime: ['0.024120'] + X-Request-Id: [ba3b9608-0492-4e9e-bf94-3c0cec978c5d] + X-Runtime: ['0.052839'] X-XSS-Protection: [1; mode=block] - content-length: ['33'] + content-length: ['34'] status: {code: 200, message: OK} - request: body: null @@ -40,11 +40,11 @@ interactions: method: GET uri: http://localhost:3000/api/v1/accounts/verify_credentials response: - body: {string: '{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"created_at":"2018-07-13T19:35:33.303Z","note":"\u003cp\u003e\u003c/p\u003e","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":5,"source":{"privacy":"public","sensitive":false,"language":null,"note":"","fields":[]},"emojis":[],"fields":[]}'} + body: {string: '{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"created_at":"2018-07-13T19:35:33.303Z","note":"\u003cp\u003e\u003c/p\u003e","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":67,"source":{"privacy":"public","sensitive":false,"language":null,"note":"","fields":[]},"emojis":[],"fields":[]}'} headers: Cache-Control: ['max-age=0, private, must-revalidate'] Content-Type: [application/json; charset=utf-8] - ETag: [W/"2c1db1f5c9c342772002bf0d4ff450ec"] + ETag: [W/"77222b64dac9878e096ec88200a8855c"] Referrer-Policy: [strict-origin-when-cross-origin] Transfer-Encoding: [chunked] Vary: ['Accept-Encoding, Origin'] @@ -52,28 +52,29 @@ interactions: X-Download-Options: [noopen] X-Frame-Options: [SAMEORIGIN] X-Permitted-Cross-Domain-Policies: [none] - X-Request-Id: [60e7b33d-da24-4ff7-8f2f-3264d837c2b6] - X-Runtime: ['0.018413'] + X-Request-Id: [6c72b0ad-2086-45ff-a7de-9fdf35686b8a] + X-Runtime: ['0.026289'] X-XSS-Protection: [1; mode=block] - content-length: ['634'] + content-length: ['635'] status: {code: 200, message: OK} - request: - body: null + body: reblogs=True&id=1 headers: Accept: ['*/*'] Accept-Encoding: ['gzip, deflate'] Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN] Connection: [keep-alive] - Content-Length: ['0'] + Content-Length: ['17'] + Content-Type: [application/x-www-form-urlencoded] User-Agent: [python-requests/2.18.4] method: POST uri: http://localhost:3000/api/v1/accounts/1/follow response: - body: {string: '{"id":"1","following":true,"showing_reblogs":false,"followed_by":false,"blocking":false,"muting":false,"muting_notifications":false,"requested":false,"domain_blocking":false}'} + body: {string: '{"id":"1","following":true,"showing_reblogs":true,"followed_by":false,"blocking":false,"muting":false,"muting_notifications":false,"requested":false,"domain_blocking":false}'} headers: Cache-Control: ['max-age=0, private, must-revalidate'] Content-Type: [application/json; charset=utf-8] - ETag: [W/"6de77dd5834bb5fc499eed9cda4081de"] + ETag: [W/"8b9b4c18fc17527693bdad489048280a"] Referrer-Policy: [strict-origin-when-cross-origin] Transfer-Encoding: [chunked] Vary: ['Accept-Encoding, Origin'] @@ -81,10 +82,10 @@ interactions: X-Download-Options: [noopen] X-Frame-Options: [SAMEORIGIN] X-Permitted-Cross-Domain-Policies: [none] - X-Request-Id: [bd78a915-f029-4986-b952-dabd4dda120c] - X-Runtime: ['0.063270'] + X-Request-Id: [47c16f53-232d-46ae-aab6-5bc99c1b197b] + X-Runtime: ['0.075269'] X-XSS-Protection: [1; mode=block] - content-length: ['174'] + content-length: ['173'] status: {code: 200, message: OK} - request: body: account_ids%5B%5D=1 @@ -97,13 +98,13 @@ interactions: Content-Type: [application/x-www-form-urlencoded] User-Agent: [python-requests/2.18.4] method: POST - uri: http://localhost:3000/api/v1/lists/8/accounts + uri: http://localhost:3000/api/v1/lists/11/accounts response: body: {string: '{}'} headers: Cache-Control: ['max-age=0, private, must-revalidate'] Content-Type: [application/json; charset=utf-8] - ETag: [W/"bf92612b432ba5b51a56b55e4c0b9817"] + ETag: [W/"cc038aae2038665db3b200fc78f63649"] Referrer-Policy: [strict-origin-when-cross-origin] Transfer-Encoding: [chunked] Vary: ['Accept-Encoding, Origin'] @@ -111,8 +112,8 @@ interactions: X-Download-Options: [noopen] X-Frame-Options: [SAMEORIGIN] X-Permitted-Cross-Domain-Policies: [none] - X-Request-Id: [f89cdcb6-0bd2-434f-83b1-5a285359bc30] - X-Runtime: ['0.047258'] + X-Request-Id: [06975fb9-7db6-4abc-9f2a-ef6527833977] + X-Runtime: ['0.132509'] X-XSS-Protection: [1; mode=block] content-length: ['2'] status: {code: 200, message: OK} @@ -125,14 +126,14 @@ interactions: Connection: [keep-alive] User-Agent: [python-requests/2.18.4] method: GET - uri: http://localhost:3000/api/v1/lists/8/accounts + uri: http://localhost:3000/api/v1/lists/11/accounts response: - body: {string: '[{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"created_at":"2018-07-13T19:35:33.303Z","note":"\u003cp\u003e\u003c/p\u003e","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":1,"following_count":0,"statuses_count":5,"emojis":[],"fields":[]}]'} + body: {string: '[{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"created_at":"2018-07-13T19:35:33.303Z","note":"\u003cp\u003e\u003c/p\u003e","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":1,"following_count":0,"statuses_count":67,"emojis":[],"fields":[]}]'} headers: Cache-Control: ['max-age=0, private, must-revalidate'] Content-Type: [application/json; charset=utf-8] - ETag: [W/"a474745c1f57a6da8e80efa488b51726"] - Link: ['; rel="prev"'] + ETag: [W/"48e17006c2bcb847af7e9265b33f6bfc"] + Link: ['; rel="prev"'] Referrer-Policy: [strict-origin-when-cross-origin] Transfer-Encoding: [chunked] Vary: ['Accept-Encoding, Origin'] @@ -140,10 +141,10 @@ interactions: X-Download-Options: [noopen] X-Frame-Options: [SAMEORIGIN] X-Permitted-Cross-Domain-Policies: [none] - X-Request-Id: [a5f30350-5070-4d6b-bf1f-b8a320da9f2a] - X-Runtime: ['0.018499'] + X-Request-Id: [f76e15ce-e515-45c9-96c3-92f7bd90fa99] + X-Runtime: ['0.053463'] X-XSS-Protection: [1; mode=block] - content-length: ['550'] + content-length: ['551'] status: {code: 200, message: OK} - request: body: null @@ -161,7 +162,7 @@ interactions: headers: Cache-Control: ['max-age=0, private, must-revalidate'] Content-Type: [application/json; charset=utf-8] - ETag: [W/"8afbf44289c39f499be3ca55837eced5"] + ETag: [W/"c1bd0e2902322c7b40156adc012ff28e"] Referrer-Policy: [strict-origin-when-cross-origin] Transfer-Encoding: [chunked] Vary: ['Accept-Encoding, Origin'] @@ -169,8 +170,8 @@ interactions: X-Download-Options: [noopen] X-Frame-Options: [SAMEORIGIN] X-Permitted-Cross-Domain-Policies: [none] - X-Request-Id: [0f7ff949-22cd-4d68-92cc-90c7ee5c8dd8] - X-Runtime: ['0.049951'] + X-Request-Id: [07363229-165e-43e5-8f91-32d7fba50802] + X-Runtime: ['0.082557'] X-XSS-Protection: [1; mode=block] content-length: ['175'] status: {code: 200, message: OK} @@ -183,13 +184,13 @@ interactions: Connection: [keep-alive] User-Agent: [python-requests/2.18.4] method: GET - uri: http://localhost:3000/api/v1/lists/8/accounts + uri: http://localhost:3000/api/v1/lists/11/accounts response: body: {string: '[]'} headers: Cache-Control: ['max-age=0, private, must-revalidate'] Content-Type: [application/json; charset=utf-8] - ETag: [W/"d77e610161dd1bed88178cffc05bb02a"] + ETag: [W/"f82743b7a0062bbc98545212015cc152"] Referrer-Policy: [strict-origin-when-cross-origin] Transfer-Encoding: [chunked] Vary: ['Accept-Encoding, Origin'] @@ -197,28 +198,29 @@ interactions: X-Download-Options: [noopen] X-Frame-Options: [SAMEORIGIN] X-Permitted-Cross-Domain-Policies: [none] - X-Request-Id: [627eb941-8858-4548-9da8-a138a77ad8dc] - X-Runtime: ['0.023576'] + X-Request-Id: [db5b3eaa-19eb-42c2-8944-955f2ea1009a] + X-Runtime: ['0.052515'] X-XSS-Protection: [1; mode=block] content-length: ['2'] status: {code: 200, message: OK} - request: - body: null + body: reblogs=True&id=1 headers: Accept: ['*/*'] Accept-Encoding: ['gzip, deflate'] Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN] Connection: [keep-alive] - Content-Length: ['0'] + Content-Length: ['17'] + Content-Type: [application/x-www-form-urlencoded] User-Agent: [python-requests/2.18.4] method: POST uri: http://localhost:3000/api/v1/accounts/1/follow response: - body: {string: '{"id":"1","following":true,"showing_reblogs":false,"followed_by":false,"blocking":false,"muting":false,"muting_notifications":false,"requested":false,"domain_blocking":false}'} + body: {string: '{"id":"1","following":true,"showing_reblogs":true,"followed_by":false,"blocking":false,"muting":false,"muting_notifications":false,"requested":false,"domain_blocking":false}'} headers: Cache-Control: ['max-age=0, private, must-revalidate'] Content-Type: [application/json; charset=utf-8] - ETag: [W/"6de77dd5834bb5fc499eed9cda4081de"] + ETag: [W/"8b9b4c18fc17527693bdad489048280a"] Referrer-Policy: [strict-origin-when-cross-origin] Transfer-Encoding: [chunked] Vary: ['Accept-Encoding, Origin'] @@ -226,10 +228,10 @@ interactions: X-Download-Options: [noopen] X-Frame-Options: [SAMEORIGIN] X-Permitted-Cross-Domain-Policies: [none] - X-Request-Id: [0d1ce293-50c1-4294-b91e-a76cf5454494] - X-Runtime: ['0.071417'] + X-Request-Id: [ec06d458-e3c1-42b2-ada8-c8f9bb3dc5b9] + X-Runtime: ['0.134772'] X-XSS-Protection: [1; mode=block] - content-length: ['174'] + content-length: ['173'] status: {code: 200, message: OK} - request: body: account_ids%5B%5D=1 @@ -242,13 +244,13 @@ interactions: Content-Type: [application/x-www-form-urlencoded] User-Agent: [python-requests/2.18.4] method: POST - uri: http://localhost:3000/api/v1/lists/8/accounts + uri: http://localhost:3000/api/v1/lists/11/accounts response: body: {string: '{}'} headers: Cache-Control: ['max-age=0, private, must-revalidate'] Content-Type: [application/json; charset=utf-8] - ETag: [W/"bf92612b432ba5b51a56b55e4c0b9817"] + ETag: [W/"0cdb2e7c6eb5550ff52103826ed9e2cd"] Referrer-Policy: [strict-origin-when-cross-origin] Transfer-Encoding: [chunked] Vary: ['Accept-Encoding, Origin'] @@ -256,8 +258,8 @@ interactions: X-Download-Options: [noopen] X-Frame-Options: [SAMEORIGIN] X-Permitted-Cross-Domain-Policies: [none] - X-Request-Id: [b8a42547-99e2-402b-8745-2f7c132dcca0] - X-Runtime: ['0.041756'] + X-Request-Id: [1dbf14ec-bd46-4d0c-a05f-e467cedf202f] + X-Runtime: ['0.061339'] X-XSS-Protection: [1; mode=block] content-length: ['2'] status: {code: 200, message: OK} @@ -270,14 +272,14 @@ interactions: Connection: [keep-alive] User-Agent: [python-requests/2.18.4] method: GET - uri: http://localhost:3000/api/v1/lists/8/accounts + uri: http://localhost:3000/api/v1/lists/11/accounts response: - body: {string: '[{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"created_at":"2018-07-13T19:35:33.303Z","note":"\u003cp\u003e\u003c/p\u003e","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":1,"following_count":0,"statuses_count":5,"emojis":[],"fields":[]}]'} + body: {string: '[{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"created_at":"2018-07-13T19:35:33.303Z","note":"\u003cp\u003e\u003c/p\u003e","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":1,"following_count":0,"statuses_count":67,"emojis":[],"fields":[]}]'} headers: Cache-Control: ['max-age=0, private, must-revalidate'] Content-Type: [application/json; charset=utf-8] - ETag: [W/"a474745c1f57a6da8e80efa488b51726"] - Link: ['; rel="prev"'] + ETag: [W/"3e75598a9b305d16f2618ab63ca1d6ad"] + Link: ['; rel="prev"'] Referrer-Policy: [strict-origin-when-cross-origin] Transfer-Encoding: [chunked] Vary: ['Accept-Encoding, Origin'] @@ -285,10 +287,10 @@ interactions: X-Download-Options: [noopen] X-Frame-Options: [SAMEORIGIN] X-Permitted-Cross-Domain-Policies: [none] - X-Request-Id: [0f5df72d-97aa-4eea-8049-aa6c9bcb819d] - X-Runtime: ['0.017421'] + X-Request-Id: [226a577e-da14-4704-9dbc-030e01583697] + X-Runtime: ['0.041821'] X-XSS-Protection: [1; mode=block] - content-length: ['550'] + content-length: ['551'] status: {code: 200, message: OK} - request: body: account_ids%5B%5D=1 @@ -301,13 +303,13 @@ interactions: Content-Type: [application/x-www-form-urlencoded] User-Agent: [python-requests/2.18.4] method: DELETE - uri: http://localhost:3000/api/v1/lists/8/accounts + uri: http://localhost:3000/api/v1/lists/11/accounts response: body: {string: '{}'} headers: Cache-Control: ['max-age=0, private, must-revalidate'] Content-Type: [application/json; charset=utf-8] - ETag: [W/"bf92612b432ba5b51a56b55e4c0b9817"] + ETag: [W/"0cdb2e7c6eb5550ff52103826ed9e2cd"] Referrer-Policy: [strict-origin-when-cross-origin] Transfer-Encoding: [chunked] Vary: ['Accept-Encoding, Origin'] @@ -315,8 +317,8 @@ interactions: X-Download-Options: [noopen] X-Frame-Options: [SAMEORIGIN] X-Permitted-Cross-Domain-Policies: [none] - X-Request-Id: [82e03414-ef8d-413f-8805-4bc9b49aef92] - X-Runtime: ['0.024025'] + X-Request-Id: [00b2aa70-ee0c-49e9-a9d4-8830f70a010d] + X-Runtime: ['0.056654'] X-XSS-Protection: [1; mode=block] content-length: ['2'] status: {code: 200, message: OK} @@ -329,13 +331,13 @@ interactions: Connection: [keep-alive] User-Agent: [python-requests/2.18.4] method: GET - uri: http://localhost:3000/api/v1/lists/8/accounts + uri: http://localhost:3000/api/v1/lists/11/accounts response: body: {string: '[]'} headers: Cache-Control: ['max-age=0, private, must-revalidate'] Content-Type: [application/json; charset=utf-8] - ETag: [W/"d77e610161dd1bed88178cffc05bb02a"] + ETag: [W/"6fddf1677be1263a4a2fd127d789d19a"] Referrer-Policy: [strict-origin-when-cross-origin] Transfer-Encoding: [chunked] Vary: ['Accept-Encoding, Origin'] @@ -343,8 +345,8 @@ interactions: X-Download-Options: [noopen] X-Frame-Options: [SAMEORIGIN] X-Permitted-Cross-Domain-Policies: [none] - X-Request-Id: [bdc94f0f-6992-4c10-8b52-cdc10e876de9] - X-Runtime: ['0.021202'] + X-Request-Id: [6cf79d0c-2111-4260-a813-7584129f2ed5] + X-Runtime: ['0.047343'] X-XSS-Protection: [1; mode=block] content-length: ['2'] status: {code: 200, message: OK} @@ -364,7 +366,7 @@ interactions: headers: Cache-Control: ['max-age=0, private, must-revalidate'] Content-Type: [application/json; charset=utf-8] - ETag: [W/"8afbf44289c39f499be3ca55837eced5"] + ETag: [W/"72b6665162a1eb117de3887134c94c6d"] Referrer-Policy: [strict-origin-when-cross-origin] Transfer-Encoding: [chunked] Vary: ['Accept-Encoding, Origin'] @@ -372,8 +374,8 @@ interactions: X-Download-Options: [noopen] X-Frame-Options: [SAMEORIGIN] X-Permitted-Cross-Domain-Policies: [none] - X-Request-Id: [5d35fd25-ad27-4d3c-8188-fce3458621f1] - X-Runtime: ['0.044831'] + X-Request-Id: [0c0227f0-d6d0-4326-9fbd-609347c580cc] + X-Runtime: ['0.096583'] X-XSS-Protection: [1; mode=block] content-length: ['175'] status: {code: 200, message: OK} @@ -387,13 +389,13 @@ interactions: Content-Length: ['0'] User-Agent: [python-requests/2.18.4] method: DELETE - uri: http://localhost:3000/api/v1/lists/8 + uri: http://localhost:3000/api/v1/lists/11 response: body: {string: '{}'} headers: Cache-Control: ['max-age=0, private, must-revalidate'] Content-Type: [application/json; charset=utf-8] - ETag: [W/"bf92612b432ba5b51a56b55e4c0b9817"] + ETag: [W/"0cdb2e7c6eb5550ff52103826ed9e2cd"] Referrer-Policy: [strict-origin-when-cross-origin] Transfer-Encoding: [chunked] Vary: ['Accept-Encoding, Origin'] @@ -401,8 +403,8 @@ interactions: X-Download-Options: [noopen] X-Frame-Options: [SAMEORIGIN] X-Permitted-Cross-Domain-Policies: [none] - X-Request-Id: [491e273f-5142-46a4-9718-23174c02ec15] - X-Runtime: ['0.021338'] + X-Request-Id: [4dd258a5-af4e-403e-ac35-3703e6428f76] + X-Runtime: ['0.064121'] X-XSS-Protection: [1; mode=block] content-length: ['2'] status: {code: 200, message: OK} -- cgit v1.2.3