diff options
-rw-r--r-- | tests/cassettes/test_blocks.yaml | 27 | ||||
-rw-r--r-- | tests/cassettes/test_mutes.yaml | 27 | ||||
-rw-r--r-- | tests/test_account.py | 12 |
3 files changed, 66 insertions, 0 deletions
diff --git a/tests/cassettes/test_blocks.yaml b/tests/cassettes/test_blocks.yaml new file mode 100644 index 0000000..7f82358 --- /dev/null +++ b/tests/cassettes/test_blocks.yaml | |||
@@ -0,0 +1,27 @@ | |||
1 | interactions: | ||
2 | - request: | ||
3 | body: null | ||
4 | headers: | ||
5 | Accept: ['*/*'] | ||
6 | Accept-Encoding: ['gzip, deflate'] | ||
7 | Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN] | ||
8 | Connection: [keep-alive] | ||
9 | User-Agent: [python-requests/2.18.4] | ||
10 | method: GET | ||
11 | uri: http://localhost:3000/api/v1/blocks | ||
12 | response: | ||
13 | body: {string: '[]'} | ||
14 | headers: | ||
15 | Cache-Control: ['max-age=0, private, must-revalidate'] | ||
16 | Content-Type: [application/json; charset=utf-8] | ||
17 | ETag: [W/"ada2bcb0a9805d2061319aaa5a76ddc2"] | ||
18 | Transfer-Encoding: [chunked] | ||
19 | Vary: ['Accept-Encoding, Origin'] | ||
20 | X-Content-Type-Options: [nosniff] | ||
21 | X-Frame-Options: [SAMEORIGIN] | ||
22 | X-Request-Id: [8aecc6a6-3aa1-4da1-aa13-504300410e99] | ||
23 | X-Runtime: ['0.020203'] | ||
24 | X-XSS-Protection: [1; mode=block] | ||
25 | content-length: ['2'] | ||
26 | status: {code: 200, message: OK} | ||
27 | version: 1 | ||
diff --git a/tests/cassettes/test_mutes.yaml b/tests/cassettes/test_mutes.yaml new file mode 100644 index 0000000..4b14354 --- /dev/null +++ b/tests/cassettes/test_mutes.yaml | |||
@@ -0,0 +1,27 @@ | |||
1 | interactions: | ||
2 | - request: | ||
3 | body: null | ||
4 | headers: | ||
5 | Accept: ['*/*'] | ||
6 | Accept-Encoding: ['gzip, deflate'] | ||
7 | Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN] | ||
8 | Connection: [keep-alive] | ||
9 | User-Agent: [python-requests/2.18.4] | ||
10 | method: GET | ||
11 | uri: http://localhost:3000/api/v1/mutes | ||
12 | response: | ||
13 | body: {string: '[]'} | ||
14 | headers: | ||
15 | Cache-Control: ['max-age=0, private, must-revalidate'] | ||
16 | Content-Type: [application/json; charset=utf-8] | ||
17 | ETag: [W/"ada2bcb0a9805d2061319aaa5a76ddc2"] | ||
18 | Transfer-Encoding: [chunked] | ||
19 | Vary: ['Accept-Encoding, Origin'] | ||
20 | X-Content-Type-Options: [nosniff] | ||
21 | X-Frame-Options: [SAMEORIGIN] | ||
22 | X-Request-Id: [c06f07d7-b198-4628-a8df-e5d0e9333260] | ||
23 | X-Runtime: ['0.027466'] | ||
24 | X-XSS-Protection: [1; mode=block] | ||
25 | content-length: ['2'] | ||
26 | status: {code: 200, message: OK} | ||
27 | version: 1 | ||
diff --git a/tests/test_account.py b/tests/test_account.py index 3c94531..dac65ac 100644 --- a/tests/test_account.py +++ b/tests/test_account.py | |||
@@ -69,6 +69,18 @@ def test_account_mute_unmute(api): | |||
69 | 69 | ||
70 | 70 | ||
71 | @pytest.mark.vcr() | 71 | @pytest.mark.vcr() |
72 | def test_mutes(api): | ||
73 | mutes = api.mutes() | ||
74 | assert isinstance(mutes, list) | ||
75 | |||
76 | |||
77 | @pytest.mark.vcr() | ||
78 | def test_blocks(api): | ||
79 | blocks = api.blocks() | ||
80 | assert isinstance(blocks, list) | ||
81 | |||
82 | |||
83 | @pytest.mark.vcr() | ||
72 | def test_account_update_credentials(api): | 84 | def test_account_update_credentials(api): |
73 | import base64 | 85 | import base64 |
74 | with open('tests/image.jpg', 'rb') as f: | 86 | with open('tests/image.jpg', 'rb') as f: |