Fix broken tests

This commit is contained in:
Lorenz Diener 2019-04-27 23:29:27 +02:00
pare 5340087325
commit 861bdc7693
S'han modificat 3 arxius amb 14 adicions i 12 eliminacions

Veure arxiu

@ -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}

Veure arxiu

@ -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}

Veure arxiu

@ -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)