diff options
author | Lorenz Diener <[email protected]> | 2018-05-07 00:53:13 +0200 |
---|---|---|
committer | Lorenz Diener <[email protected]> | 2018-05-07 00:53:13 +0200 |
commit | 8d5fe70c7e52656b2f89d0acfb1aed23bf583041 (patch) | |
tree | a210ef1ba6255d8f64fdd623de41f0e6931c4508 /tests/cassettes/test_stream_user_local.yaml | |
parent | c0a0c8f517611d0026d6d37fbe7c57eae1f1a3bb (diff) | |
download | mastodon.py-8d5fe70c7e52656b2f89d0acfb1aed23bf583041.tar.gz |
Fix some bugs, update tests
Diffstat (limited to 'tests/cassettes/test_stream_user_local.yaml')
-rw-r--r-- | tests/cassettes/test_stream_user_local.yaml | 89 |
1 files changed, 70 insertions, 19 deletions
diff --git a/tests/cassettes/test_stream_user_local.yaml b/tests/cassettes/test_stream_user_local.yaml index c67b3e0..7d475cd 100644 --- a/tests/cassettes/test_stream_user_local.yaml +++ b/tests/cassettes/test_stream_user_local.yaml | |||
@@ -4,25 +4,76 @@ interactions: | |||
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_2] | ||
8 | Connection: [keep-alive] | ||
9 | User-Agent: [python-requests/2.9.1] | ||
10 | method: GET | ||
11 | uri: http://localhost:3000/api/v1/accounts/verify_credentials | ||
12 | response: | ||
13 | body: {string: '{"id":"1","username":"admin","acct":"admin","display_name":"","locked":false,"created_at":"2018-05-06T22:36:57.850Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":10,"source":{"privacy":"public","sensitive":false,"note":""}}'} | ||
14 | headers: | ||
15 | Cache-Control: ['max-age=0, private, must-revalidate'] | ||
16 | Content-Type: [application/json; charset=utf-8] | ||
17 | ETag: [W/"15c11dfc23cf2cda445184d5e8460fcf"] | ||
18 | Transfer-Encoding: [chunked] | ||
19 | Vary: ['Accept-Encoding, Origin'] | ||
20 | X-Content-Type-Options: [nosniff] | ||
21 | X-Frame-Options: [SAMEORIGIN] | ||
22 | X-Request-Id: [f82c5ff8-4dba-43bc-980e-07c37116b8e0] | ||
23 | X-Runtime: ['0.044216'] | ||
24 | X-XSS-Protection: [1; mode=block] | ||
25 | content-length: ['571'] | ||
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_ACCESS_TOKEN_2] | ||
33 | Connection: [keep-alive] | ||
34 | Content-Length: ['0'] | ||
35 | User-Agent: [python-requests/2.9.1] | ||
36 | method: POST | ||
37 | uri: http://localhost:3000/api/v1/accounts/1/unfollow | ||
38 | response: | ||
39 | body: {string: '{"id":"1","following":false,"showing_reblogs":false,"followed_by":false,"blocking":false,"muting":false,"muting_notifications":false,"requested":false,"domain_blocking":false}'} | ||
40 | headers: | ||
41 | Cache-Control: ['max-age=0, private, must-revalidate'] | ||
42 | Content-Type: [application/json; charset=utf-8] | ||
43 | ETag: [W/"c63a2050dda59236b6c2a15e05a92893"] | ||
44 | Transfer-Encoding: [chunked] | ||
45 | Vary: ['Accept-Encoding, Origin'] | ||
46 | X-Content-Type-Options: [nosniff] | ||
47 | X-Frame-Options: [SAMEORIGIN] | ||
48 | X-Request-Id: [9fd55e86-9eed-4329-a340-bc7ffe21a669] | ||
49 | X-Runtime: ['0.059000'] | ||
50 | X-XSS-Protection: [1; mode=block] | ||
51 | content-length: ['175'] | ||
52 | status: {code: 200, message: OK} | ||
53 | - request: | ||
54 | body: null | ||
55 | headers: | ||
56 | Accept: ['*/*'] | ||
57 | Accept-Encoding: ['gzip, deflate'] | ||
7 | Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN] | 58 | Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN] |
8 | Connection: [keep-alive] | 59 | Connection: [keep-alive] |
9 | User-Agent: [python-requests/2.9.1] | 60 | User-Agent: [python-requests/2.9.1] |
10 | method: GET | 61 | method: GET |
11 | uri: http://localhost:3000/api/v1/instance/ | 62 | uri: http://localhost:3000/api/v1/instance/ |
12 | response: | 63 | response: |
13 | body: {string: '{"uri":"localhost:3000","title":"Mastodon","description":"","email":"","version":"2.3.3","urls":{"streaming_api":"ws://localhost:4000"},"stats":{"user_count":2,"status_count":176,"domain_count":0},"thumbnail":"http://localhost:3000/packs/preview.jpg","languages":["en"],"contact_account":null}'} | 64 | body: {string: '{"uri":"localhost:3000","title":"Mastodon","description":"","email":"","version":"2.3.3","urls":{"streaming_api":"ws://localhost:4000"},"stats":{"user_count":2,"status_count":13,"domain_count":0},"thumbnail":"http://localhost:3000/packs/preview.jpg","languages":["en"],"contact_account":null}'} |
14 | headers: | 65 | headers: |
15 | Cache-Control: ['max-age=0, private, must-revalidate'] | 66 | Cache-Control: ['max-age=0, private, must-revalidate'] |
16 | Content-Type: [application/json; charset=utf-8] | 67 | Content-Type: [application/json; charset=utf-8] |
17 | ETag: [W/"e7438609654ceaf29ee8473be78c6782"] | 68 | ETag: [W/"421c4f340027980c909b39b22002b1f4"] |
18 | Transfer-Encoding: [chunked] | 69 | Transfer-Encoding: [chunked] |
19 | Vary: ['Accept-Encoding, Origin'] | 70 | Vary: ['Accept-Encoding, Origin'] |
20 | X-Content-Type-Options: [nosniff] | 71 | X-Content-Type-Options: [nosniff] |
21 | X-Frame-Options: [SAMEORIGIN] | 72 | X-Frame-Options: [SAMEORIGIN] |
22 | X-Request-Id: [538a00d7-e3d9-40ab-b4a7-5ebe31b49edf] | 73 | X-Request-Id: [ffbc4aa1-8af6-4b46-b366-05aa2d3c0d6c] |
23 | X-Runtime: ['0.111461'] | 74 | X-Runtime: ['0.056935'] |
24 | X-XSS-Protection: [1; mode=block] | 75 | X-XSS-Protection: [1; mode=block] |
25 | content-length: ['293'] | 76 | content-length: ['292'] |
26 | status: {code: 200, message: OK} | 77 | status: {code: 200, message: OK} |
27 | - request: | 78 | - request: |
28 | body: status=it%27s+cool+guy | 79 | body: status=it%27s+cool+guy |
@@ -37,23 +88,23 @@ interactions: | |||
37 | method: POST | 88 | method: POST |
38 | uri: http://localhost:3000/api/v1/statuses | 89 | uri: http://localhost:3000/api/v1/statuses |
39 | response: | 90 | response: |
40 | body: {string: '{"id":"99979654724997948","created_at":"2018-05-06T01:01:01.999Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"fy","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99979654724997948","content":"\u003cp\u003eit\u0026apos;s | 91 | body: {string: '{"id":"99984807248835180","created_at":"2018-05-06T22:51:23.283Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"fy","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99984807248835180","content":"\u003cp\u003eit\u0026apos;s |
41 | cool guy\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99979654724997948","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py | 92 | cool guy\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99984807248835180","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py |
42 | test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"John | 93 | test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"John |
43 | Lennon","locked":true,"created_at":"2018-04-18T20:04:06.511Z","note":"\u003cp\u003eI | 94 | Lennon","locked":true,"created_at":"2018-05-07T00:38:05.405Z","note":"\u003cp\u003eI |
44 | walk funny\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/system/accounts/avatars/123/456/789/012/345/original/mastodonpyupload_.jpeg","avatar_static":"http://localhost:3000/system/accounts/avatars/123/456/789/012/345/original/mastodonpyupload_.jpeg","header":"http://localhost:3000/system/accounts/headers/123/456/789/012/345/original/mastodonpyupload_.jpeg","header_static":"http://localhost:3000/system/accounts/headers/123/456/789/012/345/original/mastodonpyupload_.jpeg","followers_count":0,"following_count":0,"statuses_count":129},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}'} | 95 | walk funny\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/system/accounts/avatars/123/456/789/012/345/original/mastodonpyupload_.jpeg","avatar_static":"http://localhost:3000/system/accounts/avatars/123/456/789/012/345/original/mastodonpyupload_.jpeg","header":"http://localhost:3000/system/accounts/headers/123/456/789/012/345/original/mastodonpyupload_.jpeg","header_static":"http://localhost:3000/system/accounts/headers/123/456/789/012/345/original/mastodonpyupload_.jpeg","followers_count":0,"following_count":0,"statuses_count":4},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}'} |
45 | headers: | 96 | headers: |
46 | Cache-Control: ['max-age=0, private, must-revalidate'] | 97 | Cache-Control: ['max-age=0, private, must-revalidate'] |
47 | Content-Type: [application/json; charset=utf-8] | 98 | Content-Type: [application/json; charset=utf-8] |
48 | ETag: [W/"ae8929212adac738456aad6638db6a8b"] | 99 | ETag: [W/"214f5dbab17261b078dbd3e22cf8dd0a"] |
49 | Transfer-Encoding: [chunked] | 100 | Transfer-Encoding: [chunked] |
50 | Vary: ['Accept-Encoding, Origin'] | 101 | Vary: ['Accept-Encoding, Origin'] |
51 | X-Content-Type-Options: [nosniff] | 102 | X-Content-Type-Options: [nosniff] |
52 | X-Frame-Options: [SAMEORIGIN] | 103 | X-Frame-Options: [SAMEORIGIN] |
53 | X-Request-Id: [77dcd227-6ee2-4358-a2de-6cc958590e0b] | 104 | X-Request-Id: [721d894f-4f7b-428a-8da6-a8a010460196] |
54 | X-Runtime: ['0.131181'] | 105 | X-Runtime: ['0.209618'] |
55 | X-XSS-Protection: [1; mode=block] | 106 | X-XSS-Protection: [1; mode=block] |
56 | content-length: ['1420'] | 107 | content-length: ['1418'] |
57 | status: {code: 200, message: OK} | 108 | status: {code: 200, message: OK} |
58 | - request: | 109 | - request: |
59 | body: null | 110 | body: null |
@@ -68,11 +119,11 @@ interactions: | |||
68 | response: | 119 | response: |
69 | body: {string: 'event: update | 120 | body: {string: 'event: update |
70 | 121 | ||
71 | data: {"id":"99979654724997948","created_at":"2018-05-06T01:01:01.999Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"fy","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99979654724997948","content":"<p>it's | 122 | data: {"id":"99984807248835180","created_at":"2018-05-06T22:51:23.283Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"fy","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99984807248835180","content":"<p>it's |
72 | cool guy</p>","url":"http://localhost:3000/@mastodonpy_test/99979654724997948","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py | 123 | cool guy</p>","url":"http://localhost:3000/@mastodonpy_test/99984807248835180","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py |
73 | test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"John | 124 | test suite","website":null},"account":{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"John |
74 | Lennon","locked":true,"created_at":"2018-04-18T20:04:06.511Z","note":"<p>I | 125 | Lennon","locked":true,"created_at":"2018-05-07T00:38:05.405Z","note":"<p>I |
75 | walk funny</p>","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/system/accounts/avatars/123/456/789/012/345/original/mastodonpyupload_.jpeg","avatar_static":"http://localhost:3000/system/accounts/avatars/123/456/789/012/345/original/mastodonpyupload_.jpeg","header":"http://localhost:3000/system/accounts/headers/123/456/789/012/345/original/mastodonpyupload_.jpeg","header_static":"http://localhost:3000/system/accounts/headers/123/456/789/012/345/original/mastodonpyupload_.jpeg","followers_count":0,"following_count":0,"statuses_count":129},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]} | 126 | walk funny</p>","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/system/accounts/avatars/123/456/789/012/345/original/mastodonpyupload_.jpeg","avatar_static":"http://localhost:3000/system/accounts/avatars/123/456/789/012/345/original/mastodonpyupload_.jpeg","header":"http://localhost:3000/system/accounts/headers/123/456/789/012/345/original/mastodonpyupload_.jpeg","header_static":"http://localhost:3000/system/accounts/headers/123/456/789/012/345/original/mastodonpyupload_.jpeg","followers_count":0,"following_count":0,"statuses_count":4},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]} |
76 | 127 | ||
77 | 128 | ||
78 | '} | 129 | '} |
@@ -82,9 +133,9 @@ interactions: | |||
82 | Access-Control-Allow-Origin: ['*'] | 133 | Access-Control-Allow-Origin: ['*'] |
83 | Connection: [keep-alive] | 134 | Connection: [keep-alive] |
84 | Content-Type: [text/event-stream] | 135 | Content-Type: [text/event-stream] |
85 | Date: ['Sun, 06 May 2018 01:01:02 GMT'] | 136 | Date: ['Sun, 06 May 2018 22:51:23 GMT'] |
86 | Transfer-Encoding: [chunked] | 137 | Transfer-Encoding: [chunked] |
87 | X-Powered-By: [Express] | 138 | X-Powered-By: [Express] |
88 | X-Request-Id: [05121de6-5df0-4cac-a32b-a5830a322c71] | 139 | X-Request-Id: [84741f72-f229-42ff-832c-8f1c4f1425bb] |
89 | status: {code: 200, message: OK} | 140 | status: {code: 200, message: OK} |
90 | version: 1 | 141 | version: 1 |