diff options
Diffstat (limited to 'tests/cassettes')
-rw-r--r-- | tests/cassettes/test_log_in_password.yaml | 27 | ||||
-rw-r--r-- | tests/cassettes/test_log_in_password_incorrect.yaml | 31 | ||||
-rw-r--r-- | tests/cassettes/test_log_in_password_to_file.yaml | 52 |
3 files changed, 110 insertions, 0 deletions
diff --git a/tests/cassettes/test_log_in_password.yaml b/tests/cassettes/test_log_in_password.yaml new file mode 100644 index 0000000..c44bed6 --- /dev/null +++ b/tests/cassettes/test_log_in_password.yaml | |||
@@ -0,0 +1,27 @@ | |||
1 | interactions: | ||
2 | - request: | ||
3 | body: redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&password=mastodonadmin&username=admin%40localhost%3A3000&grant_type=password&client_id=__MASTODON_PY_TEST_ID&client_secret=__MASTODON_PY_TEST_SECRET&scope=read+write+follow | ||
4 | headers: | ||
5 | Accept: ['*/*'] | ||
6 | Accept-Encoding: ['gzip, deflate'] | ||
7 | Connection: [keep-alive] | ||
8 | Content-Length: ['221'] | ||
9 | Content-Type: [application/x-www-form-urlencoded] | ||
10 | User-Agent: [python-requests/2.18.4] | ||
11 | method: POST | ||
12 | uri: http://localhost:3000/oauth/token | ||
13 | response: | ||
14 | body: {string: '{"access_token":"__MASTODON_PY_TEST_TOKEN","token_type":"bearer","scope":"read | ||
15 | write follow","created_at":1511814180}'} | ||
16 | headers: | ||
17 | Cache-Control: [no-store] | ||
18 | Content-Type: [application/json; charset=utf-8] | ||
19 | ETag: [W/"f6a22ef91276cdcde8f09c8186d2d41d"] | ||
20 | Pragma: [no-cache] | ||
21 | Transfer-Encoding: [chunked] | ||
22 | Vary: ['Accept-Encoding, Origin'] | ||
23 | X-Request-Id: [85cb59f1-b92a-4ff8-8a49-c09bed55eb98] | ||
24 | X-Runtime: ['0.077197'] | ||
25 | content-length: ['117'] | ||
26 | status: {code: 200, message: OK} | ||
27 | version: 1 | ||
diff --git a/tests/cassettes/test_log_in_password_incorrect.yaml b/tests/cassettes/test_log_in_password_incorrect.yaml new file mode 100644 index 0000000..a66fe07 --- /dev/null +++ b/tests/cassettes/test_log_in_password_incorrect.yaml | |||
@@ -0,0 +1,31 @@ | |||
1 | interactions: | ||
2 | - request: | ||
3 | body: redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&password=hunter2&username=admin%40localhost%3A3000&grant_type=password&client_id=__MASTODON_PY_TEST_ID&client_secret=__MASTODON_PY_TEST_SECRET&scope=read+write+follow | ||
4 | headers: | ||
5 | Accept: ['*/*'] | ||
6 | Accept-Encoding: ['gzip, deflate'] | ||
7 | Connection: [keep-alive] | ||
8 | Content-Length: ['215'] | ||
9 | Content-Type: [application/x-www-form-urlencoded] | ||
10 | User-Agent: [python-requests/2.18.4] | ||
11 | method: POST | ||
12 | uri: http://localhost:3000/oauth/token | ||
13 | response: | ||
14 | body: {string: '{"error":"invalid_grant","error_description":"The provided authorization | ||
15 | grant is invalid, expired, revoked, does not match the redirection URI used | ||
16 | in the authorization request, or was issued to another client."}'} | ||
17 | headers: | ||
18 | Cache-Control: [no-store] | ||
19 | Content-Type: [application/json; charset=utf-8] | ||
20 | Pragma: [no-cache] | ||
21 | Transfer-Encoding: [chunked] | ||
22 | Vary: ['Accept-Encoding, Origin'] | ||
23 | WWW-Authenticate: ['Bearer realm="Doorkeeper", error="invalid_grant", error_description="The | ||
24 | provided authorization grant is invalid, expired, revoked, does not match | ||
25 | the redirection URI used in the authorization request, or was issued to | ||
26 | another client."'] | ||
27 | X-Request-Id: [ece30cd8-c6c1-4bc7-af1a-19bbd997745e] | ||
28 | X-Runtime: ['0.077864'] | ||
29 | content-length: ['213'] | ||
30 | status: {code: 401, message: Unauthorized} | ||
31 | version: 1 | ||
diff --git a/tests/cassettes/test_log_in_password_to_file.yaml b/tests/cassettes/test_log_in_password_to_file.yaml new file mode 100644 index 0000000..f26590c --- /dev/null +++ b/tests/cassettes/test_log_in_password_to_file.yaml | |||
@@ -0,0 +1,52 @@ | |||
1 | interactions: | ||
2 | - request: | ||
3 | body: redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&password=mastodonadmin&username=admin%40localhost%3A3000&grant_type=password&client_id=__MASTODON_PY_TEST_ID&client_secret=__MASTODON_PY_TEST_SECRET&scope=read+write+follow | ||
4 | headers: | ||
5 | Accept: ['*/*'] | ||
6 | Accept-Encoding: ['gzip, deflate'] | ||
7 | Connection: [keep-alive] | ||
8 | Content-Length: ['221'] | ||
9 | Content-Type: [application/x-www-form-urlencoded] | ||
10 | User-Agent: [python-requests/2.18.4] | ||
11 | method: POST | ||
12 | uri: http://localhost:3000/oauth/token | ||
13 | response: | ||
14 | body: {string: '{"access_token":"__MASTODON_PY_TEST_TOKEN","token_type":"bearer","scope":"read | ||
15 | write follow","created_at":1511814180}'} | ||
16 | headers: | ||
17 | Cache-Control: [no-store] | ||
18 | Content-Type: [application/json; charset=utf-8] | ||
19 | ETag: [W/"f77400f50590c94b55a861fb6d432464"] | ||
20 | Pragma: [no-cache] | ||
21 | Transfer-Encoding: [chunked] | ||
22 | Vary: ['Accept-Encoding, Origin'] | ||
23 | X-Request-Id: [b6168343-dd9e-4a0f-9ec4-69a1de8f879a] | ||
24 | X-Runtime: ['0.080069'] | ||
25 | content-length: ['117'] | ||
26 | status: {code: 200, message: OK} | ||
27 | - request: | ||
28 | body: null | ||
29 | headers: | ||
30 | Accept: ['*/*'] | ||
31 | Accept-Encoding: ['gzip, deflate'] | ||
32 | Authorization: [Bearer __MASTODON_PY_TEST_TOKEN] | ||
33 | Connection: [keep-alive] | ||
34 | User-Agent: [python-requests/2.18.4] | ||
35 | method: GET | ||
36 | uri: http://localhost:3000/api/v1/accounts/verify_credentials | ||
37 | response: | ||
38 | body: {string: '{"id":"1","username":"admin","acct":"admin","display_name":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":16,"source":{"privacy":"public","sensitive":false,"note":""}}'} | ||
39 | headers: | ||
40 | Cache-Control: ['max-age=0, private, must-revalidate'] | ||
41 | Content-Type: [application/json; charset=utf-8] | ||
42 | ETag: [W/"622f72a29f8398775e2abff7cd51dbac"] | ||
43 | Transfer-Encoding: [chunked] | ||
44 | Vary: ['Accept-Encoding, Origin'] | ||
45 | X-Content-Type-Options: [nosniff] | ||
46 | X-Frame-Options: [SAMEORIGIN] | ||
47 | X-Request-Id: [3852d894-50be-4342-a0e6-f9df2ddf5926] | ||
48 | X-Runtime: ['0.029510'] | ||
49 | X-XSS-Protection: [1; mode=block] | ||
50 | content-length: ['650'] | ||
51 | status: {code: 200, message: OK} | ||
52 | version: 1 | ||