From 8d5fe70c7e52656b2f89d0acfb1aed23bf583041 Mon Sep 17 00:00:00 2001 From: Lorenz Diener Date: Mon, 7 May 2018 00:53:13 +0200 Subject: Fix some bugs, update tests --- tests/cassettes/test_report.yaml | 54 ++++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 27 deletions(-) (limited to 'tests/cassettes/test_report.yaml') diff --git a/tests/cassettes/test_report.yaml b/tests/cassettes/test_report.yaml index 1d479ad..b765ef1 100644 --- a/tests/cassettes/test_report.yaml +++ b/tests/cassettes/test_report.yaml @@ -12,22 +12,22 @@ interactions: method: POST uri: http://localhost:3000/api/v1/statuses response: - body: {string: '{"id":"99979651434402465","created_at":"2018-05-06T01:00:11.798Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99979651434402465","content":"\u003cp\u003eToot!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99979651434402465","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py + body: {string: '{"id":"99984773304649269","created_at":"2018-05-06T22:42:45.331Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"ja","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99984773304649269","content":"\u003cp\u003eToot!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99984773304649269","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"John - Lennon","locked":true,"created_at":"2018-04-18T20:04:06.511Z","note":"\u003cp\u003eI - walk funny\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/system/accounts/avatars/123/456/789/012/345/original/mastodonpyupload_.jpeg","avatar_static":"http://localhost:3000/system/accounts/avatars/123/456/789/012/345/original/mastodonpyupload_.jpeg","header":"http://localhost:3000/system/accounts/headers/123/456/789/012/345/original/mastodonpyupload_.jpeg","header_static":"http://localhost:3000/system/accounts/headers/123/456/789/012/345/original/mastodonpyupload_.jpeg","followers_count":0,"following_count":0,"statuses_count":129},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}'} + Lennon","locked":true,"created_at":"2018-05-07T00:38:05.405Z","note":"\u003cp\u003eI + walk funny\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/system/accounts/avatars/123/456/789/012/345/original/mastodonpyupload_.jpeg","avatar_static":"http://localhost:3000/system/accounts/avatars/123/456/789/012/345/original/mastodonpyupload_.jpeg","header":"http://localhost:3000/system/accounts/headers/123/456/789/012/345/original/mastodonpyupload_.jpeg","header_static":"http://localhost:3000/system/accounts/headers/123/456/789/012/345/original/mastodonpyupload_.jpeg","followers_count":0,"following_count":1,"statuses_count":2},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}'} headers: Cache-Control: ['max-age=0, private, must-revalidate'] Content-Type: [application/json; charset=utf-8] - ETag: [W/"a333616218c1aa87d78f3ba4be326c38"] + ETag: [W/"9ca8c965aa4adfa26e08ee92c9898748"] Transfer-Encoding: [chunked] Vary: ['Accept-Encoding, Origin'] X-Content-Type-Options: [nosniff] X-Frame-Options: [SAMEORIGIN] - X-Request-Id: [2c2bc656-8659-414a-bbf2-9b7a4de1a2ac] - X-Runtime: ['0.232866'] + X-Request-Id: [259156dd-522e-4e07-82dc-91c44e973a17] + X-Runtime: ['0.319546'] X-XSS-Protection: [1; mode=block] - content-length: ['1402'] + content-length: ['1400'] status: {code: 200, message: OK} - request: body: null @@ -41,24 +41,24 @@ interactions: uri: http://localhost:3000/api/v1/accounts/verify_credentials response: body: {string: '{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"John - Lennon","locked":true,"created_at":"2018-04-18T20:04:06.511Z","note":"\u003cp\u003eI - walk funny\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/system/accounts/avatars/123/456/789/012/345/original/mastodonpyupload_.jpeg","avatar_static":"http://localhost:3000/system/accounts/avatars/123/456/789/012/345/original/mastodonpyupload_.jpeg","header":"http://localhost:3000/system/accounts/headers/123/456/789/012/345/original/mastodonpyupload_.jpeg","header_static":"http://localhost:3000/system/accounts/headers/123/456/789/012/345/original/mastodonpyupload_.jpeg","followers_count":0,"following_count":0,"statuses_count":129,"source":{"privacy":"public","sensitive":false,"note":"I + Lennon","locked":true,"created_at":"2018-05-07T00:38:05.405Z","note":"\u003cp\u003eI + walk funny\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/system/accounts/avatars/123/456/789/012/345/original/mastodonpyupload_.jpeg","avatar_static":"http://localhost:3000/system/accounts/avatars/123/456/789/012/345/original/mastodonpyupload_.jpeg","header":"http://localhost:3000/system/accounts/headers/123/456/789/012/345/original/mastodonpyupload_.jpeg","header_static":"http://localhost:3000/system/accounts/headers/123/456/789/012/345/original/mastodonpyupload_.jpeg","followers_count":0,"following_count":1,"statuses_count":2,"source":{"privacy":"public","sensitive":false,"note":"I walk funny"}}'} headers: Cache-Control: ['max-age=0, private, must-revalidate'] Content-Type: [application/json; charset=utf-8] - ETag: [W/"229545a3713c8eba4e2f283dc649830e"] + ETag: [W/"3df9a077ea17ad1ee2106f28cf995829"] Transfer-Encoding: [chunked] Vary: ['Accept-Encoding, Origin'] X-Content-Type-Options: [nosniff] X-Frame-Options: [SAMEORIGIN] - X-Request-Id: [6ff34ed1-22c9-41e9-8fe1-ba6f59ac681f] - X-Runtime: ['0.063157'] + X-Request-Id: [5a140ae4-180b-4c95-992e-9098521a6aeb] + X-Runtime: ['0.229240'] X-XSS-Protection: [1; mode=block] - content-length: ['839'] + content-length: ['837'] status: {code: 200, message: OK} - request: - body: account_id=1234567890123456&comment=makes+the+bad+post&status_ids%5B%5D=99979651434402465 + body: comment=makes+the+bad+post&account_id=1234567890123456&status_ids%5B%5D=99984773304649269 headers: Accept: ['*/*'] Accept-Encoding: ['gzip, deflate'] @@ -70,17 +70,17 @@ interactions: method: POST uri: http://localhost:3000/api/v1/reports/ response: - body: {string: '{"id":"4","action_taken":false}'} + body: {string: '{"id":"2","action_taken":false}'} headers: Cache-Control: ['max-age=0, private, must-revalidate'] Content-Type: [application/json; charset=utf-8] - ETag: [W/"0b4d4cc77c3f0b6f52f7dbd3f095a453"] + ETag: [W/"dc6cff294ed2a38b24556ef5c38179ff"] Transfer-Encoding: [chunked] Vary: ['Accept-Encoding, Origin'] X-Content-Type-Options: [nosniff] X-Frame-Options: [SAMEORIGIN] - X-Request-Id: [cd1bd0e9-3e1e-4069-85c1-e6fb2594a920] - X-Runtime: ['0.075600'] + X-Request-Id: [46de98f6-9ae2-4872-bc2f-a6dfd5b97d13] + X-Runtime: ['0.108569'] X-XSS-Protection: [1; mode=block] content-length: ['31'] status: {code: 200, message: OK} @@ -95,19 +95,19 @@ interactions: method: GET uri: http://localhost:3000/api/v1/reports response: - body: {string: '[{"id":"1","action_taken":false},{"id":"2","action_taken":false},{"id":"3","action_taken":false},{"id":"4","action_taken":false}]'} + body: {string: '[{"id":"1","action_taken":false},{"id":"2","action_taken":false}]'} headers: Cache-Control: ['max-age=0, private, must-revalidate'] Content-Type: [application/json; charset=utf-8] - ETag: [W/"da6ce2cf2cdd22d7f9a1c3d3d3805141"] + ETag: [W/"75da18070f66e62dc22eeb75707259fd"] Transfer-Encoding: [chunked] Vary: ['Accept-Encoding, Origin'] X-Content-Type-Options: [nosniff] X-Frame-Options: [SAMEORIGIN] - X-Request-Id: [30e530f5-96b1-4efe-9212-ce2002db0d91] - X-Runtime: ['0.057671'] + X-Request-Id: [b7a16cdf-acb7-48c4-92e2-22d3c7489b3e] + X-Runtime: ['0.089705'] X-XSS-Protection: [1; mode=block] - content-length: ['129'] + content-length: ['65'] status: {code: 200, message: OK} - request: body: null @@ -119,19 +119,19 @@ interactions: Content-Length: ['0'] User-Agent: [python-requests/2.9.1] method: DELETE - uri: http://localhost:3000/api/v1/statuses/99979651434402465 + uri: http://localhost:3000/api/v1/statuses/99984773304649269 response: body: {string: '{}'} headers: Cache-Control: ['max-age=0, private, must-revalidate'] Content-Type: [application/json; charset=utf-8] - ETag: [W/"7a878b5976100524af8d59d1beb21fc0"] + ETag: [W/"4330459d0c31404d4fd3fe609f7750d1"] Transfer-Encoding: [chunked] Vary: ['Accept-Encoding, Origin'] X-Content-Type-Options: [nosniff] X-Frame-Options: [SAMEORIGIN] - X-Request-Id: [771d9f48-150c-4a65-84cd-f7f692167cdc] - X-Runtime: ['0.060494'] + X-Request-Id: [d1fab4a6-75c9-4da7-9739-f5f6f0a43633] + X-Runtime: ['0.148746'] X-XSS-Protection: [1; mode=block] content-length: ['2'] status: {code: 200, message: OK} -- cgit v1.2.3