From ba2fccc1cf0957387f616da64c20e329eba95263 Mon Sep 17 00:00:00 2001 From: Lorenz Diener Date: Sun, 6 May 2018 15:42:38 +0200 Subject: Add lists tests and fix a bug --- tests/cassettes/test_list_create.yaml | 80 +++++++++++++++++++++++++++++++++++ 1 file changed, 80 insertions(+) create mode 100644 tests/cassettes/test_list_create.yaml (limited to 'tests/cassettes/test_list_create.yaml') diff --git a/tests/cassettes/test_list_create.yaml b/tests/cassettes/test_list_create.yaml new file mode 100644 index 0000000..41c9d50 --- /dev/null +++ b/tests/cassettes/test_list_create.yaml @@ -0,0 +1,80 @@ +interactions: +- request: + body: title=ham+burglars + headers: + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN] + Connection: [keep-alive] + Content-Length: ['18'] + Content-Type: [application/x-www-form-urlencoded] + User-Agent: [python-requests/2.9.1] + method: POST + uri: http://localhost:3000/api/v1/lists + response: + body: {string: '{"id":"21","title":"ham burglars"}'} + headers: + Cache-Control: ['max-age=0, private, must-revalidate'] + Content-Type: [application/json; charset=utf-8] + ETag: [W/"7a697af6c938508b5253601ebd4dd6e6"] + Transfer-Encoding: [chunked] + Vary: ['Accept-Encoding, Origin'] + X-Content-Type-Options: [nosniff] + X-Frame-Options: [SAMEORIGIN] + X-Request-Id: [ace7486c-8c0b-46ef-8dc2-69719035824f] + X-Runtime: ['0.030442'] + X-XSS-Protection: [1; mode=block] + content-length: ['34'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN] + Connection: [keep-alive] + User-Agent: [python-requests/2.9.1] + method: GET + uri: http://localhost:3000/api/v1/lists + response: + body: {string: '[{"id":"1","title":"ham burglars"},{"id":"21","title":"ham burglars"}]'} + headers: + Cache-Control: ['max-age=0, private, must-revalidate'] + Content-Type: [application/json; charset=utf-8] + ETag: [W/"158cecd920100143aaaaca0e264e3eff"] + Transfer-Encoding: [chunked] + Vary: ['Accept-Encoding, Origin'] + X-Content-Type-Options: [nosniff] + X-Frame-Options: [SAMEORIGIN] + X-Request-Id: [cb76cdf7-a8a4-47ab-b22d-8d605bfcb2e5] + X-Runtime: ['0.019989'] + X-XSS-Protection: [1; mode=block] + content-length: ['70'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: ['*/*'] + Accept-Encoding: ['gzip, deflate'] + Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN] + Connection: [keep-alive] + Content-Length: ['0'] + User-Agent: [python-requests/2.9.1] + method: DELETE + uri: http://localhost:3000/api/v1/lists/21 + response: + body: {string: '{}'} + headers: + Cache-Control: ['max-age=0, private, must-revalidate'] + Content-Type: [application/json; charset=utf-8] + ETag: [W/"517599317c4db2fd6c980b4f38eaa967"] + Transfer-Encoding: [chunked] + Vary: ['Accept-Encoding, Origin'] + X-Content-Type-Options: [nosniff] + X-Frame-Options: [SAMEORIGIN] + X-Request-Id: [82ba57ca-5026-403f-a024-8b33c87504a2] + X-Runtime: ['0.025599'] + X-XSS-Protection: [1; mode=block] + content-length: ['2'] + status: {code: 200, message: OK} +version: 1 -- cgit v1.2.3