add timeline tests
This commit is contained in:
pare
765db0fc81
commit
cfc9c1ce0c
S'han modificat 6 arxius amb 464 adicions i 0 eliminacions
91
tests/cassettes/test_hashtag_tl.yaml
Normal file
91
tests/cassettes/test_hashtag_tl.yaml
Normal file
|
@ -0,0 +1,91 @@
|
|||
interactions:
|
||||
- request:
|
||||
body: visibility=&status=%23hoot+%28hashtag+toot%29
|
||||
headers:
|
||||
Accept: ['*/*']
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
Authorization: [Bearer __MASTODON_PY_TEST_TOKEN]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['45']
|
||||
Content-Type: [application/x-www-form-urlencoded]
|
||||
User-Agent: [python-requests/2.18.4]
|
||||
method: POST
|
||||
uri: http://localhost:3000/api/v1/statuses
|
||||
response:
|
||||
body: {string: '{"id":"99074296373847415","created_at":"2017-11-27T03:36:29.893Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"mi","uri":"http://localhost:3000/users/admin/statuses/99074296373847415","content":"\u003cp\u003e\u003ca
|
||||
href=\"http://localhost:3000/tags/hoot\" class=\"mention hashtag\" rel=\"tag\"\u003e#\u003cspan\u003ehoot\u003c/span\u003e\u003c/a\u003e
|
||||
(hashtag toot)\u003c/p\u003e","url":"http://localhost:3000/@admin/99074296373847415","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
|
||||
test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[{"name":"hoot","url":"http://localhost:3000/tags/hoot"}],"emojis":[]}'}
|
||||
headers:
|
||||
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
ETag: [W/"f60ff0be0aeee79d1a50e6be59aed1f2"]
|
||||
Transfer-Encoding: [chunked]
|
||||
Vary: ['Accept-Encoding, Origin']
|
||||
X-Content-Type-Options: [nosniff]
|
||||
X-Frame-Options: [SAMEORIGIN]
|
||||
X-Request-Id: [07fe386d-da01-4b38-8a34-ed9d9c24890d]
|
||||
X-Runtime: ['0.104177']
|
||||
X-XSS-Protection: [1; mode=block]
|
||||
content-length: ['1425']
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: ['*/*']
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
Authorization: [Bearer __MASTODON_PY_TEST_TOKEN]
|
||||
Connection: [keep-alive]
|
||||
User-Agent: [python-requests/2.18.4]
|
||||
method: GET
|
||||
uri: http://localhost:3000/api/v1/timelines/tag/hoot
|
||||
response:
|
||||
body: {string: '[{"id":"99074296373847415","created_at":"2017-11-27T03:36:29.893Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"mi","uri":"http://localhost:3000/users/admin/statuses/99074296373847415","content":"\u003cp\u003e\u003ca
|
||||
href=\"http://localhost:3000/tags/hoot\" class=\"mention hashtag\" rel=\"tag\"\u003e#\u003cspan\u003ehoot\u003c/span\u003e\u003c/a\u003e
|
||||
(hashtag toot)\u003c/p\u003e","url":"http://localhost:3000/@admin/99074296373847415","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
|
||||
test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[{"name":"hoot","url":"http://localhost:3000/tags/hoot"}],"emojis":[]}]'}
|
||||
headers:
|
||||
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
ETag: [W/"0f7aee960cd49873868d4fd8da888d6d"]
|
||||
Link: ['<http://localhost:3000/api/v1/timelines/tag/hoot?max_id=99074296373847415>;
|
||||
rel="next", <http://localhost:3000/api/v1/timelines/tag/hoot?since_id=99074296373847415>;
|
||||
rel="prev"']
|
||||
Transfer-Encoding: [chunked]
|
||||
Vary: ['Accept-Encoding, Origin']
|
||||
X-Content-Type-Options: [nosniff]
|
||||
X-Frame-Options: [SAMEORIGIN]
|
||||
X-Request-Id: [169667bf-b799-4347-af75-cbc585297b82]
|
||||
X-Runtime: ['0.067114']
|
||||
X-XSS-Protection: [1; mode=block]
|
||||
content-length: ['1427']
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: ['*/*']
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
Authorization: [Bearer __MASTODON_PY_TEST_TOKEN]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['0']
|
||||
User-Agent: [python-requests/2.18.4]
|
||||
method: DELETE
|
||||
uri: http://localhost:3000/api/v1/statuses/99074296373847415
|
||||
response:
|
||||
body: {string: '{}'}
|
||||
headers:
|
||||
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
ETag: [W/"612eb80804af851684b89190dee9562c"]
|
||||
Transfer-Encoding: [chunked]
|
||||
Vary: ['Accept-Encoding, Origin']
|
||||
X-Content-Type-Options: [nosniff]
|
||||
X-Frame-Options: [SAMEORIGIN]
|
||||
X-Request-Id: [92588be3-0129-48be-8894-a6e6d0043159]
|
||||
X-Runtime: ['0.018806']
|
||||
X-XSS-Protection: [1; mode=block]
|
||||
content-length: ['2']
|
||||
status: {code: 200, message: OK}
|
||||
version: 1
|
112
tests/cassettes/test_home_tl.yaml
Normal file
112
tests/cassettes/test_home_tl.yaml
Normal file
|
@ -0,0 +1,112 @@
|
|||
interactions:
|
||||
- request:
|
||||
body: visibility=&status=Toot%21
|
||||
headers:
|
||||
Accept: ['*/*']
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
Authorization: [Bearer __MASTODON_PY_TEST_TOKEN]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['26']
|
||||
Content-Type: [application/x-www-form-urlencoded]
|
||||
User-Agent: [python-requests/2.18.4]
|
||||
method: POST
|
||||
uri: http://localhost:3000/api/v1/statuses
|
||||
response:
|
||||
body: {string: '{"id":"99074150389153814","created_at":"2017-11-27T02:59:22.483Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/99074150389153814","content":"\u003cp\u003eToot!\u003c/p\u003e","url":"http://localhost:3000/@admin/99074150389153814","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
|
||||
test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}'}
|
||||
headers:
|
||||
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
ETag: [W/"8aaa23be1d41fe74a9af1b96aa8d0c74"]
|
||||
Transfer-Encoding: [chunked]
|
||||
Vary: ['Accept-Encoding, Origin']
|
||||
X-Content-Type-Options: [nosniff]
|
||||
X-Frame-Options: [SAMEORIGIN]
|
||||
X-Request-Id: [fa1adf43-b0da-4d0a-ba6c-fd3c12f011dd]
|
||||
X-Runtime: ['0.668773']
|
||||
X-XSS-Protection: [1; mode=block]
|
||||
content-length: ['1216']
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: ['*/*']
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
Authorization: [Bearer __MASTODON_PY_TEST_TOKEN]
|
||||
Connection: [keep-alive]
|
||||
User-Agent: [python-requests/2.18.4]
|
||||
method: GET
|
||||
uri: http://localhost:3000/api/v1/timelines/home
|
||||
response:
|
||||
body: {string: '[{"id":"99074150389153814","created_at":"2017-11-27T02:59:22.483Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/99074150389153814","content":"\u003cp\u003eToot!\u003c/p\u003e","url":"http://localhost:3000/@admin/99074150389153814","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
|
||||
test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99001495355823477","created_at":"2017-11-14T07:02:14.631Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/99001495355823477","content":"\u003cp\u003echeck
|
||||
this website out \u003ca href=\"https://www.google.com/\" rel=\"nofollow noopener\"
|
||||
target=\"_blank\"\u003e\u003cspan class=\"invisible\"\u003ehttps://www.\u003c/span\u003e\u003cspan
|
||||
class=\"\"\u003egoogle.com/\u003c/span\u003e\u003cspan class=\"invisible\"\u003e\u003c/span\u003e\u003c/a\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin/99001495355823477","reblogs_count":1,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Web","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99001474318868985","created_at":"2017-11-14T06:56:53.605Z","in_reply_to_id":"98857859740548138","in_reply_to_account_id":"1","sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/99001474318868985","content":"\u003cp\u003eit
|
||||
is me codl, hello\u003c/p\u003e","url":"http://localhost:3000/@admin/99001474318868985","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Web","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99001443489597078","created_at":"2017-11-14T06:49:03.095Z","in_reply_to_id":"99001298568412948","in_reply_to_account_id":"1","sensitive":false,"spoiler_text":"","visibility":"public","language":"zh","uri":"http://localhost:3000/users/admin/statuses/99001443489597078","content":"\u003cp\u003ehhhh\u003c/p\u003e","url":"http://localhost:3000/@admin/99001443489597078","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Web","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99001298568412948","created_at":"2017-11-14T06:12:11.874Z","in_reply_to_id":"98952033484245524","in_reply_to_account_id":"1","sensitive":false,"spoiler_text":"","visibility":"public","language":"sr","uri":"http://localhost:3000/users/admin/statuses/99001298568412948","content":"\u003cp\u003ehello\u003c/p\u003e","url":"http://localhost:3000/@admin/99001298568412948","reblogs_count":0,"favourites_count":1,"favourited":true,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Web","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99001155403249389","created_at":"2017-11-14T05:35:47.388Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/99001155403249389","content":"\u003cp\u003ei
|
||||
switched my robot off\u003c/p\u003e","url":"http://localhost:3000/@admin/99001155403249389","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Web","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"98952033484245524","created_at":"2017-11-05T13:23:26.252Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"cy","uri":"http://localhost:3000/users/admin/statuses/98952033484245524","content":"\u003cp\u003eim
|
||||
a big dummy\u003c/p\u003e","url":"http://localhost:3000/@admin/98952033484245524","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Web","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"98952024438552459","created_at":"2017-11-05T13:21:08.228Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"gl","uri":"http://localhost:3000/users/admin/statuses/98952024438552459","content":"\u003cp\u003ebihhhhhhhhhhhhhhhh!!!!!\u003c/p\u003e","url":"http://localhost:3000/@admin/98952024438552459","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Web","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"98952023057752144","created_at":"2017-11-05T13:20:47.252Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/98952023057752144","content":"\u003cp\u003ebihhhhhh!!!!\u003c/p\u003e","url":"http://localhost:3000/@admin/98952023057752144","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Web","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"98952019628490365","created_at":"2017-11-05T13:19:54.925Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"su","uri":"http://localhost:3000/users/admin/statuses/98952019628490365","content":"\u003cp\u003ebih\u003c/p\u003e","url":"http://localhost:3000/@admin/98952019628490365","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Web","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"98857859740548138","created_at":"2017-10-19T22:13:49.019Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"sv","uri":"http://localhost:3000/users/admin/statuses/98857859740548138","content":"\u003cp\u003ehttp://localhost:3000/media/2KDfQL4FFYbvGCKAqy4\u003c/p\u003e","url":"http://localhost:3000/@admin/98857859740548138","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Web","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[{"id":"1","type":"image","url":"http://localhost:3000/system/media_attachments/files/000/000/001/original/20b10ed1b3f75445.jpg","preview_url":"http://localhost:3000/system/media_attachments/files/000/000/001/small/20b10ed1b3f75445.jpg","remote_url":null,"text_url":"http://localhost:3000/media/2KDfQL4FFYbvGCKAqy4","meta":{"original":{"width":500,"height":300,"size":"500x300","aspect":1.6666666666666667},"small":{"width":400,"height":240,"size":"400x240","aspect":1.6666666666666667}},"description":null}],"mentions":[],"tags":[],"emojis":[]},{"id":"98857736010757809","created_at":"2017-10-19T21:42:20.992Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/98857736010757809","content":"\u003cp\u003e\u003cspan
|
||||
class=\"h-card\"\u003e\u003ca href=\"https://chitter.xyz/@codl\" class=\"u-url
|
||||
mention\"\u003e@\u003cspan\u003ecodl\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e
|
||||
bup\u003c/p\u003e","url":"http://localhost:3000/@admin/98857736010757809","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Web","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[{"id":"2","username":"codl","url":"https://chitter.xyz/@codl","acct":"codl@chitter.xyz"}],"tags":[],"emojis":[]},{"id":"98857696070095085","created_at":"2017-10-19T21:32:11.563Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"bs","uri":"http://localhost:3000/users/admin/statuses/98857696070095085","content":"\u003cp\u003eughh\u003c/p\u003e","url":"http://localhost:3000/@admin/98857696070095085","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Web","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"4","created_at":"2017-09-10T17:12:35.515Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":null,"uri":"http://localhost:3000/users/admin/statuses/4","content":"\u003cp\u003eh\u003c/p\u003e","url":"http://localhost:3000/@admin/4","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":true,"reblog":null,"application":{"name":"Web","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"3","created_at":"2017-09-10T10:36:56.774Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"uk","uri":"tag:localhost:3000,2017-09-10:objectId=3:objectType=Status","content":"\u003cp\u003eb\u003c/p\u003e","url":"http://localhost:3000/@admin/3","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Web","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"2","created_at":"2017-07-01T17:11:02.368Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"so","uri":"tag:localhost:3000,2017-07-01:objectId=2:objectType=Status","content":"\u003cp\u003eamigaaaa\u003c/p\u003e","url":"http://localhost:3000/@admin/2","reblogs_count":0,"favourites_count":1,"favourited":true,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Web","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"1","created_at":"2017-07-01T17:10:58.379Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"sr","uri":"tag:localhost:3000,2017-07-01:objectId=1:objectType=Status","content":"\u003cp\u003ehello\u003c/p\u003e","url":"http://localhost:3000/@admin/1","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Web","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}]'}
|
||||
headers:
|
||||
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
ETag: [W/"d3d0161b0db4efda07ad225e9c3106de"]
|
||||
Link: ['<http://localhost:3000/api/v1/timelines/home?max_id=1>; rel="next",
|
||||
<http://localhost:3000/api/v1/timelines/home?since_id=99074150389153814>;
|
||||
rel="prev"']
|
||||
Transfer-Encoding: [chunked]
|
||||
Vary: ['Accept-Encoding, Origin']
|
||||
X-Content-Type-Options: [nosniff]
|
||||
X-Frame-Options: [SAMEORIGIN]
|
||||
X-Request-Id: [86f9b99a-d434-46f9-b082-fe0dbfb82021]
|
||||
X-Runtime: ['0.456834']
|
||||
X-XSS-Protection: [1; mode=block]
|
||||
content-length: ['21437']
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: ['*/*']
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
Authorization: [Bearer __MASTODON_PY_TEST_TOKEN]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['0']
|
||||
User-Agent: [python-requests/2.18.4]
|
||||
method: DELETE
|
||||
uri: http://localhost:3000/api/v1/statuses/99074150389153814
|
||||
response:
|
||||
body: {string: '{}'}
|
||||
headers:
|
||||
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
ETag: [W/"8886360f0986d9356a5cb01b56913bb3"]
|
||||
Transfer-Encoding: [chunked]
|
||||
Vary: ['Accept-Encoding, Origin']
|
||||
X-Content-Type-Options: [nosniff]
|
||||
X-Frame-Options: [SAMEORIGIN]
|
||||
X-Request-Id: [b3d99b8a-5814-4341-9822-94efd0e50881]
|
||||
X-Runtime: ['0.022703']
|
||||
X-XSS-Protection: [1; mode=block]
|
||||
content-length: ['2']
|
||||
status: {code: 200, message: OK}
|
||||
version: 1
|
112
tests/cassettes/test_public_tl.yaml
Normal file
112
tests/cassettes/test_public_tl.yaml
Normal file
|
@ -0,0 +1,112 @@
|
|||
interactions:
|
||||
- request:
|
||||
body: visibility=&status=Toot%21
|
||||
headers:
|
||||
Accept: ['*/*']
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
Authorization: [Bearer __MASTODON_PY_TEST_TOKEN]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['26']
|
||||
Content-Type: [application/x-www-form-urlencoded]
|
||||
User-Agent: [python-requests/2.18.4]
|
||||
method: POST
|
||||
uri: http://localhost:3000/api/v1/statuses
|
||||
response:
|
||||
body: {string: '{"id":"99074150343904058","created_at":"2017-11-27T02:59:21.653Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/99074150343904058","content":"\u003cp\u003eToot!\u003c/p\u003e","url":"http://localhost:3000/@admin/99074150343904058","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
|
||||
test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":21},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}'}
|
||||
headers:
|
||||
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
ETag: [W/"f7f3388008f593451d02e4ddc9ebd8b0"]
|
||||
Transfer-Encoding: [chunked]
|
||||
Vary: ['Accept-Encoding, Origin']
|
||||
X-Content-Type-Options: [nosniff]
|
||||
X-Frame-Options: [SAMEORIGIN]
|
||||
X-Request-Id: [c8849623-a545-4c89-9334-cf2f08b3654f]
|
||||
X-Runtime: ['0.076757']
|
||||
X-XSS-Protection: [1; mode=block]
|
||||
content-length: ['1216']
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: ['*/*']
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
Authorization: [Bearer __MASTODON_PY_TEST_TOKEN]
|
||||
Connection: [keep-alive]
|
||||
User-Agent: [python-requests/2.18.4]
|
||||
method: GET
|
||||
uri: http://localhost:3000/api/v1/timelines/public
|
||||
response:
|
||||
body: {string: '[{"id":"99074150343904058","created_at":"2017-11-27T02:59:21.653Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/99074150343904058","content":"\u003cp\u003eToot!\u003c/p\u003e","url":"http://localhost:3000/@admin/99074150343904058","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
|
||||
test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99001495355823477","created_at":"2017-11-14T07:02:14.631Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/99001495355823477","content":"\u003cp\u003echeck
|
||||
this website out \u003ca href=\"https://www.google.com/\" rel=\"nofollow noopener\"
|
||||
target=\"_blank\"\u003e\u003cspan class=\"invisible\"\u003ehttps://www.\u003c/span\u003e\u003cspan
|
||||
class=\"\"\u003egoogle.com/\u003c/span\u003e\u003cspan class=\"invisible\"\u003e\u003c/span\u003e\u003c/a\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin/99001495355823477","reblogs_count":1,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Web","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99001474318868985","created_at":"2017-11-14T06:56:53.605Z","in_reply_to_id":"98857859740548138","in_reply_to_account_id":"1","sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/99001474318868985","content":"\u003cp\u003eit
|
||||
is me codl, hello\u003c/p\u003e","url":"http://localhost:3000/@admin/99001474318868985","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Web","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99001443489597078","created_at":"2017-11-14T06:49:03.095Z","in_reply_to_id":"99001298568412948","in_reply_to_account_id":"1","sensitive":false,"spoiler_text":"","visibility":"public","language":"zh","uri":"http://localhost:3000/users/admin/statuses/99001443489597078","content":"\u003cp\u003ehhhh\u003c/p\u003e","url":"http://localhost:3000/@admin/99001443489597078","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Web","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99001298568412948","created_at":"2017-11-14T06:12:11.874Z","in_reply_to_id":"98952033484245524","in_reply_to_account_id":"1","sensitive":false,"spoiler_text":"","visibility":"public","language":"sr","uri":"http://localhost:3000/users/admin/statuses/99001298568412948","content":"\u003cp\u003ehello\u003c/p\u003e","url":"http://localhost:3000/@admin/99001298568412948","reblogs_count":0,"favourites_count":1,"favourited":true,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Web","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99001155403249389","created_at":"2017-11-14T05:35:47.388Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/99001155403249389","content":"\u003cp\u003ei
|
||||
switched my robot off\u003c/p\u003e","url":"http://localhost:3000/@admin/99001155403249389","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Web","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"98952033484245524","created_at":"2017-11-05T13:23:26.252Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"cy","uri":"http://localhost:3000/users/admin/statuses/98952033484245524","content":"\u003cp\u003eim
|
||||
a big dummy\u003c/p\u003e","url":"http://localhost:3000/@admin/98952033484245524","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Web","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"98952024438552459","created_at":"2017-11-05T13:21:08.228Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"gl","uri":"http://localhost:3000/users/admin/statuses/98952024438552459","content":"\u003cp\u003ebihhhhhhhhhhhhhhhh!!!!!\u003c/p\u003e","url":"http://localhost:3000/@admin/98952024438552459","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Web","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"98952023057752144","created_at":"2017-11-05T13:20:47.252Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/98952023057752144","content":"\u003cp\u003ebihhhhhh!!!!\u003c/p\u003e","url":"http://localhost:3000/@admin/98952023057752144","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Web","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"98952019628490365","created_at":"2017-11-05T13:19:54.925Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"su","uri":"http://localhost:3000/users/admin/statuses/98952019628490365","content":"\u003cp\u003ebih\u003c/p\u003e","url":"http://localhost:3000/@admin/98952019628490365","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Web","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"98857859740548138","created_at":"2017-10-19T22:13:49.019Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"sv","uri":"http://localhost:3000/users/admin/statuses/98857859740548138","content":"\u003cp\u003ehttp://localhost:3000/media/2KDfQL4FFYbvGCKAqy4\u003c/p\u003e","url":"http://localhost:3000/@admin/98857859740548138","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Web","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[{"id":"1","type":"image","url":"http://localhost:3000/system/media_attachments/files/000/000/001/original/20b10ed1b3f75445.jpg","preview_url":"http://localhost:3000/system/media_attachments/files/000/000/001/small/20b10ed1b3f75445.jpg","remote_url":null,"text_url":"http://localhost:3000/media/2KDfQL4FFYbvGCKAqy4","meta":{"original":{"width":500,"height":300,"size":"500x300","aspect":1.6666666666666667},"small":{"width":400,"height":240,"size":"400x240","aspect":1.6666666666666667}},"description":null}],"mentions":[],"tags":[],"emojis":[]},{"id":"98857736010757809","created_at":"2017-10-19T21:42:20.992Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/98857736010757809","content":"\u003cp\u003e\u003cspan
|
||||
class=\"h-card\"\u003e\u003ca href=\"https://chitter.xyz/@codl\" class=\"u-url
|
||||
mention\"\u003e@\u003cspan\u003ecodl\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e
|
||||
bup\u003c/p\u003e","url":"http://localhost:3000/@admin/98857736010757809","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Web","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[{"id":"2","username":"codl","url":"https://chitter.xyz/@codl","acct":"codl@chitter.xyz"}],"tags":[],"emojis":[]},{"id":"98857696070095085","created_at":"2017-10-19T21:32:11.563Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"bs","uri":"http://localhost:3000/users/admin/statuses/98857696070095085","content":"\u003cp\u003eughh\u003c/p\u003e","url":"http://localhost:3000/@admin/98857696070095085","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Web","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"4","created_at":"2017-09-10T17:12:35.515Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":null,"uri":"http://localhost:3000/users/admin/statuses/4","content":"\u003cp\u003eh\u003c/p\u003e","url":"http://localhost:3000/@admin/4","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":true,"reblog":null,"application":{"name":"Web","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"3","created_at":"2017-09-10T10:36:56.774Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"uk","uri":"tag:localhost:3000,2017-09-10:objectId=3:objectType=Status","content":"\u003cp\u003eb\u003c/p\u003e","url":"http://localhost:3000/@admin/3","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Web","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"2","created_at":"2017-07-01T17:11:02.368Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"so","uri":"tag:localhost:3000,2017-07-01:objectId=2:objectType=Status","content":"\u003cp\u003eamigaaaa\u003c/p\u003e","url":"http://localhost:3000/@admin/2","reblogs_count":0,"favourites_count":1,"favourited":true,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Web","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"1","created_at":"2017-07-01T17:10:58.379Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"sr","uri":"tag:localhost:3000,2017-07-01:objectId=1:objectType=Status","content":"\u003cp\u003ehello\u003c/p\u003e","url":"http://localhost:3000/@admin/1","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Web","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}]'}
|
||||
headers:
|
||||
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
ETag: [W/"d2fa7b4dc5b37d8dfb906882930f24f3"]
|
||||
Link: ['<http://localhost:3000/api/v1/timelines/public?max_id=1>; rel="next",
|
||||
<http://localhost:3000/api/v1/timelines/public?since_id=99074150343904058>;
|
||||
rel="prev"']
|
||||
Transfer-Encoding: [chunked]
|
||||
Vary: ['Accept-Encoding, Origin']
|
||||
X-Content-Type-Options: [nosniff]
|
||||
X-Frame-Options: [SAMEORIGIN]
|
||||
X-Request-Id: [b483ee78-12f9-4231-a2f3-a217cbd0b304]
|
||||
X-Runtime: ['0.297829']
|
||||
X-XSS-Protection: [1; mode=block]
|
||||
content-length: ['21437']
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: ['*/*']
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
Authorization: [Bearer __MASTODON_PY_TEST_TOKEN]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['0']
|
||||
User-Agent: [python-requests/2.18.4]
|
||||
method: DELETE
|
||||
uri: http://localhost:3000/api/v1/statuses/99074150343904058
|
||||
response:
|
||||
body: {string: '{}'}
|
||||
headers:
|
||||
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
ETag: [W/"75144ef1858ee07800358c14137f5336"]
|
||||
Transfer-Encoding: [chunked]
|
||||
Vary: ['Accept-Encoding, Origin']
|
||||
X-Content-Type-Options: [nosniff]
|
||||
X-Frame-Options: [SAMEORIGIN]
|
||||
X-Request-Id: [f6c4edcf-f985-4dfd-90f9-977ae4b1ca44]
|
||||
X-Runtime: ['0.021484']
|
||||
X-XSS-Protection: [1; mode=block]
|
||||
content-length: ['2']
|
||||
status: {code: 200, message: OK}
|
||||
version: 1
|
111
tests/cassettes/test_public_tl_anonymous.yaml
Normal file
111
tests/cassettes/test_public_tl_anonymous.yaml
Normal file
|
@ -0,0 +1,111 @@
|
|||
interactions:
|
||||
- request:
|
||||
body: visibility=&status=Toot%21
|
||||
headers:
|
||||
Accept: ['*/*']
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
Authorization: [Bearer __MASTODON_PY_TEST_TOKEN]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['26']
|
||||
Content-Type: [application/x-www-form-urlencoded]
|
||||
User-Agent: [python-requests/2.18.4]
|
||||
method: POST
|
||||
uri: http://localhost:3000/api/v1/statuses
|
||||
response:
|
||||
body: {string: '{"id":"99074150262979861","created_at":"2017-11-27T02:59:20.628Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/99074150262979861","content":"\u003cp\u003eToot!\u003c/p\u003e","url":"http://localhost:3000/@admin/99074150262979861","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":false,"pinned":false,"reblog":null,"application":{"name":"Mastodon.py
|
||||
test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}'}
|
||||
headers:
|
||||
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
ETag: [W/"0387d8652d02d52164f88732a1b77bf1"]
|
||||
Transfer-Encoding: [chunked]
|
||||
Vary: ['Accept-Encoding, Origin']
|
||||
X-Content-Type-Options: [nosniff]
|
||||
X-Frame-Options: [SAMEORIGIN]
|
||||
X-Request-Id: [d1565536-599b-4333-8d65-19e6240c729d]
|
||||
X-Runtime: ['0.828476']
|
||||
X-XSS-Protection: [1; mode=block]
|
||||
content-length: ['1216']
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: ['*/*']
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
Connection: [keep-alive]
|
||||
User-Agent: [python-requests/2.18.4]
|
||||
method: GET
|
||||
uri: http://localhost:3000/api/v1/timelines/public
|
||||
response:
|
||||
body: {string: '[{"id":"99074150262979861","created_at":"2017-11-27T02:59:20.628Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/99074150262979861","content":"\u003cp\u003eToot!\u003c/p\u003e","url":"http://localhost:3000/@admin/99074150262979861","reblogs_count":0,"favourites_count":0,"reblog":null,"application":{"name":"Mastodon.py
|
||||
test suite","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99001495355823477","created_at":"2017-11-14T07:02:14.631Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/99001495355823477","content":"\u003cp\u003echeck
|
||||
this website out \u003ca href=\"https://www.google.com/\" rel=\"nofollow noopener\"
|
||||
target=\"_blank\"\u003e\u003cspan class=\"invisible\"\u003ehttps://www.\u003c/span\u003e\u003cspan
|
||||
class=\"\"\u003egoogle.com/\u003c/span\u003e\u003cspan class=\"invisible\"\u003e\u003c/span\u003e\u003c/a\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin/99001495355823477","reblogs_count":1,"favourites_count":0,"reblog":null,"application":{"name":"Web","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99001474318868985","created_at":"2017-11-14T06:56:53.605Z","in_reply_to_id":"98857859740548138","in_reply_to_account_id":"1","sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/99001474318868985","content":"\u003cp\u003eit
|
||||
is me codl, hello\u003c/p\u003e","url":"http://localhost:3000/@admin/99001474318868985","reblogs_count":0,"favourites_count":0,"reblog":null,"application":{"name":"Web","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99001443489597078","created_at":"2017-11-14T06:49:03.095Z","in_reply_to_id":"99001298568412948","in_reply_to_account_id":"1","sensitive":false,"spoiler_text":"","visibility":"public","language":"zh","uri":"http://localhost:3000/users/admin/statuses/99001443489597078","content":"\u003cp\u003ehhhh\u003c/p\u003e","url":"http://localhost:3000/@admin/99001443489597078","reblogs_count":0,"favourites_count":0,"reblog":null,"application":{"name":"Web","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99001298568412948","created_at":"2017-11-14T06:12:11.874Z","in_reply_to_id":"98952033484245524","in_reply_to_account_id":"1","sensitive":false,"spoiler_text":"","visibility":"public","language":"sr","uri":"http://localhost:3000/users/admin/statuses/99001298568412948","content":"\u003cp\u003ehello\u003c/p\u003e","url":"http://localhost:3000/@admin/99001298568412948","reblogs_count":0,"favourites_count":1,"reblog":null,"application":{"name":"Web","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99001155403249389","created_at":"2017-11-14T05:35:47.388Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/99001155403249389","content":"\u003cp\u003ei
|
||||
switched my robot off\u003c/p\u003e","url":"http://localhost:3000/@admin/99001155403249389","reblogs_count":0,"favourites_count":0,"reblog":null,"application":{"name":"Web","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"98952033484245524","created_at":"2017-11-05T13:23:26.252Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"cy","uri":"http://localhost:3000/users/admin/statuses/98952033484245524","content":"\u003cp\u003eim
|
||||
a big dummy\u003c/p\u003e","url":"http://localhost:3000/@admin/98952033484245524","reblogs_count":0,"favourites_count":0,"reblog":null,"application":{"name":"Web","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"98952024438552459","created_at":"2017-11-05T13:21:08.228Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"gl","uri":"http://localhost:3000/users/admin/statuses/98952024438552459","content":"\u003cp\u003ebihhhhhhhhhhhhhhhh!!!!!\u003c/p\u003e","url":"http://localhost:3000/@admin/98952024438552459","reblogs_count":0,"favourites_count":0,"reblog":null,"application":{"name":"Web","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"98952023057752144","created_at":"2017-11-05T13:20:47.252Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/98952023057752144","content":"\u003cp\u003ebihhhhhh!!!!\u003c/p\u003e","url":"http://localhost:3000/@admin/98952023057752144","reblogs_count":0,"favourites_count":0,"reblog":null,"application":{"name":"Web","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"98952019628490365","created_at":"2017-11-05T13:19:54.925Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"su","uri":"http://localhost:3000/users/admin/statuses/98952019628490365","content":"\u003cp\u003ebih\u003c/p\u003e","url":"http://localhost:3000/@admin/98952019628490365","reblogs_count":0,"favourites_count":0,"reblog":null,"application":{"name":"Web","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"98857859740548138","created_at":"2017-10-19T22:13:49.019Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"sv","uri":"http://localhost:3000/users/admin/statuses/98857859740548138","content":"\u003cp\u003ehttp://localhost:3000/media/2KDfQL4FFYbvGCKAqy4\u003c/p\u003e","url":"http://localhost:3000/@admin/98857859740548138","reblogs_count":0,"favourites_count":0,"reblog":null,"application":{"name":"Web","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[{"id":"1","type":"image","url":"http://localhost:3000/system/media_attachments/files/000/000/001/original/20b10ed1b3f75445.jpg","preview_url":"http://localhost:3000/system/media_attachments/files/000/000/001/small/20b10ed1b3f75445.jpg","remote_url":null,"text_url":"http://localhost:3000/media/2KDfQL4FFYbvGCKAqy4","meta":{"original":{"width":500,"height":300,"size":"500x300","aspect":1.6666666666666667},"small":{"width":400,"height":240,"size":"400x240","aspect":1.6666666666666667}},"description":null}],"mentions":[],"tags":[],"emojis":[]},{"id":"98857736010757809","created_at":"2017-10-19T21:42:20.992Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/admin/statuses/98857736010757809","content":"\u003cp\u003e\u003cspan
|
||||
class=\"h-card\"\u003e\u003ca href=\"https://chitter.xyz/@codl\" class=\"u-url
|
||||
mention\"\u003e@\u003cspan\u003ecodl\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e
|
||||
bup\u003c/p\u003e","url":"http://localhost:3000/@admin/98857736010757809","reblogs_count":0,"favourites_count":0,"reblog":null,"application":{"name":"Web","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[{"id":"2","username":"codl","url":"https://chitter.xyz/@codl","acct":"codl@chitter.xyz"}],"tags":[],"emojis":[]},{"id":"98857696070095085","created_at":"2017-10-19T21:32:11.563Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"bs","uri":"http://localhost:3000/users/admin/statuses/98857696070095085","content":"\u003cp\u003eughh\u003c/p\u003e","url":"http://localhost:3000/@admin/98857696070095085","reblogs_count":0,"favourites_count":0,"reblog":null,"application":{"name":"Web","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"4","created_at":"2017-09-10T17:12:35.515Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":null,"uri":"http://localhost:3000/users/admin/statuses/4","content":"\u003cp\u003eh\u003c/p\u003e","url":"http://localhost:3000/@admin/4","reblogs_count":0,"favourites_count":0,"reblog":null,"application":{"name":"Web","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"3","created_at":"2017-09-10T10:36:56.774Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"uk","uri":"tag:localhost:3000,2017-09-10:objectId=3:objectType=Status","content":"\u003cp\u003eb\u003c/p\u003e","url":"http://localhost:3000/@admin/3","reblogs_count":0,"favourites_count":0,"reblog":null,"application":{"name":"Web","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"2","created_at":"2017-07-01T17:11:02.368Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"so","uri":"tag:localhost:3000,2017-07-01:objectId=2:objectType=Status","content":"\u003cp\u003eamigaaaa\u003c/p\u003e","url":"http://localhost:3000/@admin/2","reblogs_count":0,"favourites_count":1,"reblog":null,"application":{"name":"Web","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"1","created_at":"2017-07-01T17:10:58.379Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"sr","uri":"tag:localhost:3000,2017-07-01:objectId=1:objectType=Status","content":"\u003cp\u003ehello\u003c/p\u003e","url":"http://localhost:3000/@admin/1","reblogs_count":0,"favourites_count":0,"reblog":null,"application":{"name":"Web","website":null},"account":{"id":"1","username":"admin","acct":"admin","display_name":"codltest","locked":false,"created_at":"2017-07-01T17:09:15.621Z","note":"\u003cp\u003ehello
|
||||
:)\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/99b4c443463de195.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":1,"following_count":0,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}]'}
|
||||
headers:
|
||||
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
ETag: [W/"0e502912a61e4aeac95fe41acfa35a57"]
|
||||
Link: ['<http://localhost:3000/api/v1/timelines/public?max_id=1>; rel="next",
|
||||
<http://localhost:3000/api/v1/timelines/public?since_id=99074150262979861>;
|
||||
rel="prev"']
|
||||
Transfer-Encoding: [chunked]
|
||||
Vary: ['Accept-Encoding, Origin']
|
||||
X-Content-Type-Options: [nosniff]
|
||||
X-Frame-Options: [SAMEORIGIN]
|
||||
X-Request-Id: [b8bce071-0a90-4e3a-b6fa-9c14cb652b19]
|
||||
X-Runtime: ['0.530154']
|
||||
X-XSS-Protection: [1; mode=block]
|
||||
content-length: ['20318']
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: null
|
||||
headers:
|
||||
Accept: ['*/*']
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
Authorization: [Bearer __MASTODON_PY_TEST_TOKEN]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['0']
|
||||
User-Agent: [python-requests/2.18.4]
|
||||
method: DELETE
|
||||
uri: http://localhost:3000/api/v1/statuses/99074150262979861
|
||||
response:
|
||||
body: {string: '{}'}
|
||||
headers:
|
||||
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
ETag: [W/"a4ddf36da225f8821cac7c5a7c856f2f"]
|
||||
Transfer-Encoding: [chunked]
|
||||
Vary: ['Accept-Encoding, Origin']
|
||||
X-Content-Type-Options: [nosniff]
|
||||
X-Frame-Options: [SAMEORIGIN]
|
||||
X-Request-Id: [716c93f9-dbac-464b-b7d1-1a22c0e4d8bf]
|
||||
X-Runtime: ['0.059979']
|
||||
X-XSS-Protection: [1; mode=block]
|
||||
content-length: ['2']
|
||||
status: {code: 200, message: OK}
|
||||
version: 1
|
|
@ -9,6 +9,14 @@ def mastodon():
|
|||
client_secret='__MASTODON_PY_TEST_SECRET',
|
||||
access_token='__MASTODON_PY_TEST_TOKEN')
|
||||
|
||||
@pytest.fixture
|
||||
def mastodon_anonymous():
|
||||
import mastodon as _mastodon
|
||||
return _mastodon.Mastodon(
|
||||
api_base_url='http://localhost:3000',
|
||||
client_id='__MASTODON_PY_TEST_ID',
|
||||
client_secret='__MASTODON_PY_TEST_SECRET')
|
||||
|
||||
@pytest.fixture()
|
||||
def status(mastodon):
|
||||
_status = mastodon.status_post('Toot!')
|
||||
|
|
30
tests/test_timeline.py
Normal file
30
tests/test_timeline.py
Normal file
|
@ -0,0 +1,30 @@
|
|||
import pytest
|
||||
|
||||
@pytest.mark.vcr()
|
||||
def test_public_tl_anonymous(mastodon_anonymous, status):
|
||||
tl = mastodon_anonymous.timeline_public()
|
||||
assert status['id'] in map(lambda st: st['id'], tl)
|
||||
# although tempting, we can't do
|
||||
# assert status in tl
|
||||
# because the statuses returned in the tl have additional
|
||||
# pagination-related attributes
|
||||
|
||||
@pytest.mark.vcr()
|
||||
def test_public_tl(mastodon, status):
|
||||
tl = mastodon.timeline_public()
|
||||
print(tl[0])
|
||||
assert status['id'] in map(lambda st: st['id'], tl)
|
||||
|
||||
@pytest.mark.vcr()
|
||||
def test_home_tl(mastodon, status):
|
||||
tl = mastodon.timeline_home()
|
||||
assert status['id'] in map(lambda st: st['id'], tl)
|
||||
|
||||
@pytest.mark.vcr()
|
||||
def test_hashtag_tl(mastodon):
|
||||
status = mastodon.status_post('#hoot (hashtag toot)')
|
||||
tl = mastodon.timeline_hashtag('hoot')
|
||||
try:
|
||||
assert status['id'] in map(lambda st: st['id'], tl)
|
||||
finally:
|
||||
mastodon.status_delete(status['id'])
|
Loading…
Referencia en una nova incidència