diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/cassettes/test_preferences.yaml | 30 | ||||
-rw-r--r-- | tests/test_account.py | 5 |
2 files changed, 34 insertions, 1 deletions
diff --git a/tests/cassettes/test_preferences.yaml b/tests/cassettes/test_preferences.yaml new file mode 100644 index 0000000..e6e660f --- /dev/null +++ b/tests/cassettes/test_preferences.yaml | |||
@@ -0,0 +1,30 @@ | |||
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/preferences | ||
12 | response: | ||
13 | body: {string: '{"posting:default:visibility":"public","posting:default:sensitive":false,"posting:default:language":null,"reading:expand:media":"default","reading:expand:spoilers":false}'} | ||
14 | headers: | ||
15 | Cache-Control: ['max-age=0, private, must-revalidate'] | ||
16 | Content-Type: [application/json; charset=utf-8] | ||
17 | ETag: [W/"16e1b4c608ece78202df9c19d6a56932"] | ||
18 | Referrer-Policy: [strict-origin-when-cross-origin] | ||
19 | Transfer-Encoding: [chunked] | ||
20 | Vary: ['Accept-Encoding, Origin'] | ||
21 | X-Content-Type-Options: [nosniff] | ||
22 | X-Download-Options: [noopen] | ||
23 | X-Frame-Options: [SAMEORIGIN] | ||
24 | X-Permitted-Cross-Domain-Policies: [none] | ||
25 | X-Request-Id: [0b19cc10-64ae-4fd4-827e-0e8e1b46c673] | ||
26 | X-Runtime: ['0.032833'] | ||
27 | X-XSS-Protection: [1; mode=block] | ||
28 | content-length: ['170'] | ||
29 | status: {code: 200, message: OK} | ||
30 | version: 1 | ||
diff --git a/tests/test_account.py b/tests/test_account.py index cd7633d..9821c13 100644 --- a/tests/test_account.py +++ b/tests/test_account.py | |||
@@ -205,4 +205,7 @@ def test_account_pin_unpin(api, api2): | |||
205 | assert not relationship['endorsed'] | 205 | assert not relationship['endorsed'] |
206 | assert not user["id"] in map(lambda x: x["id"], endorsed2) | 206 | assert not user["id"] in map(lambda x: x["id"], endorsed2) |
207 | 207 | ||
208 | 208 | @pytest.mark.vcr() | |
209 | def test_preferences(api): | ||
210 | prefs = api.preferences() | ||
211 | assert prefs | ||