From 64ec9e20987072692227d8817d9fd99d497fea5e Mon Sep 17 00:00:00 2001 From: Lorenz Diener Date: Wed, 18 Apr 2018 22:00:35 +0200 Subject: Update the tests --- tests/cassettes/test_account_search.yaml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'tests/cassettes/test_account_search.yaml') diff --git a/tests/cassettes/test_account_search.yaml b/tests/cassettes/test_account_search.yaml index dc90126..bef0efe 100644 --- a/tests/cassettes/test_account_search.yaml +++ b/tests/cassettes/test_account_search.yaml @@ -6,23 +6,22 @@ interactions: Accept-Encoding: ['gzip, deflate'] Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN] Connection: [keep-alive] - User-Agent: [python-requests/2.18.4] + User-Agent: [python-requests/2.9.1] method: GET - uri: http://localhost:3000/api/v1/accounts/search?q=admin + uri: http://localhost:3000/api/v1/accounts/search?following=False&q=admin response: - body: {string: '[{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello - :)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.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":50}]'} + body: {string: '[{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"created_at":"2018-04-17T21:40:55.626Z","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":20}]'} headers: Cache-Control: ['max-age=0, private, must-revalidate'] Content-Type: [application/json; charset=utf-8] - ETag: [W/"f257564844f554885596d31ac16d0607"] + ETag: [W/"a33987d51db8acd3a08240e241001040"] Transfer-Encoding: [chunked] Vary: ['Accept-Encoding, Origin'] X-Content-Type-Options: [nosniff] X-Frame-Options: [SAMEORIGIN] - X-Request-Id: [efde9755-3e09-4e66-89d3-ad28026d0a0a] - X-Runtime: ['0.047304'] + X-Request-Id: [b956b6ec-6446-42b2-b8bf-7a0210d8d42a] + X-Runtime: ['0.123298'] X-XSS-Protection: [1; mode=block] - content-length: ['605'] + content-length: ['515'] status: {code: 200, message: OK} version: 1 -- cgit v1.2.3 From bc7b9defe8b72b6ab14ade6828a98f4d6e82b1de Mon Sep 17 00:00:00 2001 From: Lorenz Diener Date: Wed, 18 Apr 2018 22:07:03 +0200 Subject: Attempt 2 at fixing the tests for travis --- tests/cassettes/test_account_search.yaml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'tests/cassettes/test_account_search.yaml') diff --git a/tests/cassettes/test_account_search.yaml b/tests/cassettes/test_account_search.yaml index bef0efe..06aab91 100644 --- a/tests/cassettes/test_account_search.yaml +++ b/tests/cassettes/test_account_search.yaml @@ -24,4 +24,29 @@ interactions: X-XSS-Protection: [1; mode=block] content-length: ['515'] 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/accounts/search?following=False&q=admin + response: + body: {string: '[]'} + headers: + Cache-Control: ['max-age=0, private, must-revalidate'] + Content-Type: [application/json; charset=utf-8] + ETag: [W/"5e588fc017a83fb7d2ef23e497250076"] + Transfer-Encoding: [chunked] + Vary: ['Accept-Encoding, Origin'] + X-Content-Type-Options: [nosniff] + X-Frame-Options: [SAMEORIGIN] + X-Request-Id: [8149e8a9-9215-408a-8048-2ab42b24b5cd] + X-Runtime: ['0.107377'] + X-XSS-Protection: [1; mode=block] + content-length: ['2'] + status: {code: 200, message: OK} version: 1 -- cgit v1.2.3 From a15d28d9d60128fd5551f05eccd8999b46f70f5e Mon Sep 17 00:00:00 2001 From: Lorenz Diener Date: Sun, 6 May 2018 01:37:13 +0200 Subject: Testing updates, can now test streaming API --- tests/cassettes/test_account_search.yaml | 33 ++++---------------------------- 1 file changed, 4 insertions(+), 29 deletions(-) (limited to 'tests/cassettes/test_account_search.yaml') diff --git a/tests/cassettes/test_account_search.yaml b/tests/cassettes/test_account_search.yaml index 06aab91..6cc7b0d 100644 --- a/tests/cassettes/test_account_search.yaml +++ b/tests/cassettes/test_account_search.yaml @@ -8,44 +8,19 @@ interactions: Connection: [keep-alive] User-Agent: [python-requests/2.9.1] method: GET - uri: http://localhost:3000/api/v1/accounts/search?following=False&q=admin - response: - body: {string: '[{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"created_at":"2018-04-17T21:40:55.626Z","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":20}]'} - headers: - Cache-Control: ['max-age=0, private, must-revalidate'] - Content-Type: [application/json; charset=utf-8] - ETag: [W/"a33987d51db8acd3a08240e241001040"] - Transfer-Encoding: [chunked] - Vary: ['Accept-Encoding, Origin'] - X-Content-Type-Options: [nosniff] - X-Frame-Options: [SAMEORIGIN] - X-Request-Id: [b956b6ec-6446-42b2-b8bf-7a0210d8d42a] - X-Runtime: ['0.123298'] - X-XSS-Protection: [1; mode=block] - content-length: ['515'] - 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/accounts/search?following=False&q=admin + uri: http://localhost:3000/api/v1/accounts/search?q=admin&following=False response: body: {string: '[]'} headers: Cache-Control: ['max-age=0, private, must-revalidate'] Content-Type: [application/json; charset=utf-8] - ETag: [W/"5e588fc017a83fb7d2ef23e497250076"] + ETag: [W/"ff6bfee647b6b23b1c55091ca75794ba"] Transfer-Encoding: [chunked] Vary: ['Accept-Encoding, Origin'] X-Content-Type-Options: [nosniff] X-Frame-Options: [SAMEORIGIN] - X-Request-Id: [8149e8a9-9215-408a-8048-2ab42b24b5cd] - X-Runtime: ['0.107377'] + X-Request-Id: [d2ca3b10-b015-4bcd-83f0-1de04e602251] + X-Runtime: ['0.049612'] X-XSS-Protection: [1; mode=block] content-length: ['2'] status: {code: 200, message: OK} -- cgit v1.2.3 From bb92f76e61063bbe59868659fb42824d3649c7b2 Mon Sep 17 00:00:00 2001 From: Lorenz Diener Date: Sun, 6 May 2018 03:02:19 +0200 Subject: Refresh casettes and add some new ones --- tests/cassettes/test_account_search.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/cassettes/test_account_search.yaml') diff --git a/tests/cassettes/test_account_search.yaml b/tests/cassettes/test_account_search.yaml index 6cc7b0d..31f25e5 100644 --- a/tests/cassettes/test_account_search.yaml +++ b/tests/cassettes/test_account_search.yaml @@ -8,19 +8,19 @@ interactions: Connection: [keep-alive] User-Agent: [python-requests/2.9.1] method: GET - uri: http://localhost:3000/api/v1/accounts/search?q=admin&following=False + uri: http://localhost:3000/api/v1/accounts/search?following=False&q=admin response: body: {string: '[]'} headers: Cache-Control: ['max-age=0, private, must-revalidate'] Content-Type: [application/json; charset=utf-8] - ETag: [W/"ff6bfee647b6b23b1c55091ca75794ba"] + ETag: [W/"d21cc31537780b09e689112cad9f33d5"] Transfer-Encoding: [chunked] Vary: ['Accept-Encoding, Origin'] X-Content-Type-Options: [nosniff] X-Frame-Options: [SAMEORIGIN] - X-Request-Id: [d2ca3b10-b015-4bcd-83f0-1de04e602251] - X-Runtime: ['0.049612'] + X-Request-Id: [e0308c3e-a422-44e9-9991-80cbeab109c8] + X-Runtime: ['0.071572'] X-XSS-Protection: [1; mode=block] content-length: ['2'] status: {code: 200, message: OK} -- cgit v1.2.3