aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorenz Diener <[email protected]>2019-04-27 23:29:27 +0200
committerLorenz Diener <[email protected]>2019-04-27 23:29:27 +0200
commit861bdc7693a5d39377e7c46daea6a5a0e9d54189 (patch)
treef70342a4d1ebf25926a16d3c967db12573858527
parent5340087325242a7a43c97f8218aeb8f2b5b44ef0 (diff)
downloadmastodon.py-861bdc7693a5d39377e7c46daea6a5a0e9d54189.tar.gz
Fix broken tests
-rw-r--r--tests/cassettes/test_account_mute_unmute.yaml17
-rw-r--r--tests/cassettes/test_mutes.yaml6
-rw-r--r--tests/test_pagination.py3
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 @@
1interactions: 1interactions:
2- request: 2- request:
3 body: null 3 body: notifications=1
4 headers: 4 headers:
5 Accept: ['*/*'] 5 Accept: ['*/*']
6 Accept-Encoding: ['gzip, deflate'] 6 Accept-Encoding: ['gzip, deflate']
7 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN] 7 Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
8 Connection: [keep-alive] 8 Connection: [keep-alive]
9 Content-Length: ['0'] 9 Content-Length: ['15']
10 Content-Type: [application/x-www-form-urlencoded]
10 User-Agent: [python-requests/2.18.4] 11 User-Agent: [python-requests/2.18.4]
11 method: POST 12 method: POST
12 uri: http://localhost:3000/api/v1/accounts/1/mute 13 uri: http://localhost:3000/api/v1/accounts/1/mute
@@ -15,7 +16,7 @@ interactions:
15 headers: 16 headers:
16 Cache-Control: ['max-age=0, private, must-revalidate'] 17 Cache-Control: ['max-age=0, private, must-revalidate']
17 Content-Type: [application/json; charset=utf-8] 18 Content-Type: [application/json; charset=utf-8]
18 ETag: [W/"e4d8187853fd28ab46e94172d60f0f0d"] 19 ETag: [W/"59de293253d478bb34c984ebe11efe4f"]
19 Referrer-Policy: [strict-origin-when-cross-origin] 20 Referrer-Policy: [strict-origin-when-cross-origin]
20 Transfer-Encoding: [chunked] 21 Transfer-Encoding: [chunked]
21 Vary: ['Accept-Encoding, Origin'] 22 Vary: ['Accept-Encoding, Origin']
@@ -23,8 +24,8 @@ interactions:
23 X-Download-Options: [noopen] 24 X-Download-Options: [noopen]
24 X-Frame-Options: [SAMEORIGIN] 25 X-Frame-Options: [SAMEORIGIN]
25 X-Permitted-Cross-Domain-Policies: [none] 26 X-Permitted-Cross-Domain-Policies: [none]
26 X-Request-Id: [8f07b007-6f77-42c4-b78c-56ea8e740e54] 27 X-Request-Id: [59ef8a80-0d38-41e9-8b9f-4f59e8a718d1]
27 X-Runtime: ['0.066529'] 28 X-Runtime: ['0.110376']
28 X-XSS-Protection: [1; mode=block] 29 X-XSS-Protection: [1; mode=block]
29 content-length: ['209'] 30 content-length: ['209']
30 status: {code: 200, message: OK} 31 status: {code: 200, message: OK}
@@ -44,7 +45,7 @@ interactions:
44 headers: 45 headers:
45 Cache-Control: ['max-age=0, private, must-revalidate'] 46 Cache-Control: ['max-age=0, private, must-revalidate']
46 Content-Type: [application/json; charset=utf-8] 47 Content-Type: [application/json; charset=utf-8]
47 ETag: [W/"93a1f854f426a7241ace77f72b5209db"] 48 ETag: [W/"f8c3361d53e3585ee39fcaf8f68d8c8e"]
48 Referrer-Policy: [strict-origin-when-cross-origin] 49 Referrer-Policy: [strict-origin-when-cross-origin]
49 Transfer-Encoding: [chunked] 50 Transfer-Encoding: [chunked]
50 Vary: ['Accept-Encoding, Origin'] 51 Vary: ['Accept-Encoding, Origin']
@@ -52,8 +53,8 @@ interactions:
52 X-Download-Options: [noopen] 53 X-Download-Options: [noopen]
53 X-Frame-Options: [SAMEORIGIN] 54 X-Frame-Options: [SAMEORIGIN]
54 X-Permitted-Cross-Domain-Policies: [none] 55 X-Permitted-Cross-Domain-Policies: [none]
55 X-Request-Id: [fb908398-428f-4d8b-9e48-a690e7c6a47f] 56 X-Request-Id: [62d07f15-81d2-4add-8551-fec673d711db]
56 X-Runtime: ['0.055213'] 57 X-Runtime: ['0.069967']
57 X-XSS-Protection: [1; mode=block] 58 X-XSS-Protection: [1; mode=block]
58 content-length: ['211'] 59 content-length: ['211']
59 status: {code: 200, message: OK} 60 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:
14 headers: 14 headers:
15 Cache-Control: ['max-age=0, private, must-revalidate'] 15 Cache-Control: ['max-age=0, private, must-revalidate']
16 Content-Type: [application/json; charset=utf-8] 16 Content-Type: [application/json; charset=utf-8]
17 ETag: [W/"0c6c8cc3cb75164dfb4ec124c252008f"] 17 ETag: [W/"0c6bce88f363a149a163d74b6bd89011"]
18 Referrer-Policy: [strict-origin-when-cross-origin] 18 Referrer-Policy: [strict-origin-when-cross-origin]
19 Transfer-Encoding: [chunked] 19 Transfer-Encoding: [chunked]
20 Vary: ['Accept-Encoding, Origin'] 20 Vary: ['Accept-Encoding, Origin']
@@ -22,8 +22,8 @@ interactions:
22 X-Download-Options: [noopen] 22 X-Download-Options: [noopen]
23 X-Frame-Options: [SAMEORIGIN] 23 X-Frame-Options: [SAMEORIGIN]
24 X-Permitted-Cross-Domain-Policies: [none] 24 X-Permitted-Cross-Domain-Policies: [none]
25 X-Request-Id: [1bef2ecf-ea12-422d-802a-456ab7096e0b] 25 X-Request-Id: [44bd8c53-57ed-485a-bbd9-57c90fdb06a0]
26 X-Runtime: ['0.060542'] 26 X-Runtime: ['0.017772']
27 X-XSS-Protection: [1; mode=block] 27 X-XSS-Protection: [1; mode=block]
28 content-length: ['2'] 28 content-length: ['2']
29 status: {code: 200, message: OK} 29 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):
56 assert previous_statuses 56 assert previous_statuses
57 57
58def test_fetch_next_previous_from_pagination_info_old_pagination(api): 58def test_fetch_next_previous_from_pagination_info_old_pagination(api):
59 account = api.account_verify_credentials()
60 with vcr.use_cassette('test_fetch_next_previous_from_pagination_info.yaml', cassette_library_dir='tests/cassettes_old_pagination', record_mode='none'): 59 with vcr.use_cassette('test_fetch_next_previous_from_pagination_info.yaml', cassette_library_dir='tests/cassettes_old_pagination', record_mode='none'):
60 account = api.account_verify_credentials()
61
61 with many_statuses(api): 62 with many_statuses(api):
62 statuses = api.account_statuses(account['id'], limit=5) 63 statuses = api.account_statuses(account['id'], limit=5)
63 next_statuses = api.fetch_next(statuses[-1]._pagination_next) 64 next_statuses = api.fetch_next(statuses[-1]._pagination_next)
Powered by cgit v1.2.3 (git 2.41.0)