From 861bdc7693a5d39377e7c46daea6a5a0e9d54189 Mon Sep 17 00:00:00 2001 From: Lorenz Diener Date: Sat, 27 Apr 2019 23:29:27 +0200 Subject: Fix broken tests --- tests/cassettes/test_account_mute_unmute.yaml | 17 +++++++++-------- tests/cassettes/test_mutes.yaml | 6 +++--- tests/test_pagination.py | 3 ++- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/tests/cassettes/test_account_mute_unmute.yaml b/tests/cassettes/test_account_mute_unmute.yaml index 3a4c605..483a235 100644 --- a/tests/cassettes/test_account_mute_unmute.yaml +++ b/tests/cassettes/test_account_mute_unmute.yaml @@ -1,12 +1,13 @@ interactions: - request: - body: null + body: notifications=1 headers: Accept: ['*/*'] Accept-Encoding: ['gzip, deflate'] Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN] Connection: [keep-alive] - Content-Length: ['0'] + Content-Length: ['15'] + Content-Type: [application/x-www-form-urlencoded] User-Agent: [python-requests/2.18.4] method: POST uri: http://localhost:3000/api/v1/accounts/1/mute @@ -15,7 +16,7 @@ interactions: headers: Cache-Control: ['max-age=0, private, must-revalidate'] Content-Type: [application/json; charset=utf-8] - ETag: [W/"e4d8187853fd28ab46e94172d60f0f0d"] + ETag: [W/"59de293253d478bb34c984ebe11efe4f"] Referrer-Policy: [strict-origin-when-cross-origin] Transfer-Encoding: [chunked] Vary: ['Accept-Encoding, Origin'] @@ -23,8 +24,8 @@ interactions: X-Download-Options: [noopen] X-Frame-Options: [SAMEORIGIN] X-Permitted-Cross-Domain-Policies: [none] - X-Request-Id: [8f07b007-6f77-42c4-b78c-56ea8e740e54] - X-Runtime: ['0.066529'] + X-Request-Id: [59ef8a80-0d38-41e9-8b9f-4f59e8a718d1] + X-Runtime: ['0.110376'] X-XSS-Protection: [1; mode=block] content-length: ['209'] status: {code: 200, message: OK} @@ -44,7 +45,7 @@ interactions: headers: Cache-Control: ['max-age=0, private, must-revalidate'] Content-Type: [application/json; charset=utf-8] - ETag: [W/"93a1f854f426a7241ace77f72b5209db"] + ETag: [W/"f8c3361d53e3585ee39fcaf8f68d8c8e"] Referrer-Policy: [strict-origin-when-cross-origin] Transfer-Encoding: [chunked] Vary: ['Accept-Encoding, Origin'] @@ -52,8 +53,8 @@ interactions: X-Download-Options: [noopen] X-Frame-Options: [SAMEORIGIN] X-Permitted-Cross-Domain-Policies: [none] - X-Request-Id: [fb908398-428f-4d8b-9e48-a690e7c6a47f] - X-Runtime: ['0.055213'] + X-Request-Id: [62d07f15-81d2-4add-8551-fec673d711db] + X-Runtime: ['0.069967'] X-XSS-Protection: [1; mode=block] content-length: ['211'] status: {code: 200, message: OK} diff --git a/tests/cassettes/test_mutes.yaml b/tests/cassettes/test_mutes.yaml index aca7b97..311fbb0 100644 --- a/tests/cassettes/test_mutes.yaml +++ b/tests/cassettes/test_mutes.yaml @@ -14,7 +14,7 @@ interactions: headers: Cache-Control: ['max-age=0, private, must-revalidate'] Content-Type: [application/json; charset=utf-8] - ETag: [W/"0c6c8cc3cb75164dfb4ec124c252008f"] + ETag: [W/"0c6bce88f363a149a163d74b6bd89011"] Referrer-Policy: [strict-origin-when-cross-origin] Transfer-Encoding: [chunked] Vary: ['Accept-Encoding, Origin'] @@ -22,8 +22,8 @@ interactions: X-Download-Options: [noopen] X-Frame-Options: [SAMEORIGIN] X-Permitted-Cross-Domain-Policies: [none] - X-Request-Id: [1bef2ecf-ea12-422d-802a-456ab7096e0b] - X-Runtime: ['0.060542'] + X-Request-Id: [44bd8c53-57ed-485a-bbd9-57c90fdb06a0] + X-Runtime: ['0.017772'] X-XSS-Protection: [1; mode=block] content-length: ['2'] status: {code: 200, message: OK} diff --git a/tests/test_pagination.py b/tests/test_pagination.py index fc64854..72ac06e 100644 --- a/tests/test_pagination.py +++ b/tests/test_pagination.py @@ -56,8 +56,9 @@ def test_fetch_next_previous_old_pagination(api): assert previous_statuses def test_fetch_next_previous_from_pagination_info_old_pagination(api): - account = api.account_verify_credentials() with vcr.use_cassette('test_fetch_next_previous_from_pagination_info.yaml', cassette_library_dir='tests/cassettes_old_pagination', record_mode='none'): + account = api.account_verify_credentials() + with many_statuses(api): statuses = api.account_statuses(account['id'], limit=5) next_statuses = api.fetch_next(statuses[-1]._pagination_next) -- cgit v1.2.3