add test for pagination
This commit is contained in:
pare
38f99480db
commit
655a45e086
S'han modificat 2 arxius amb 715 adicions i 0 eliminacions
691
tests/cassettes/test_fetch_next_previous.yaml
Normal file
691
tests/cassettes/test_fetch_next_previous.yaml
Normal file
|
@ -0,0 +1,691 @@
|
|||
interactions:
|
||||
- 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/accounts/verify_credentials
|
||||
response:
|
||||
body: {string: '{"id":"1","username":"admin","acct":"admin","display_name":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":16,"source":{"privacy":"public","sensitive":false,"note":""}}'}
|
||||
headers:
|
||||
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
ETag: [W/"0b23966bf2a17efbd2f219cc1a1e20f9"]
|
||||
Transfer-Encoding: [chunked]
|
||||
Vary: ['Accept-Encoding, Origin']
|
||||
X-Content-Type-Options: [nosniff]
|
||||
X-Frame-Options: [SAMEORIGIN]
|
||||
X-Request-Id: [c9233fd0-133a-4263-bfc1-76ab7f471018]
|
||||
X-Runtime: ['0.020981']
|
||||
X-XSS-Protection: [1; mode=block]
|
||||
content-length: ['650']
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: visibility=&status=Toot+number+0%21
|
||||
headers:
|
||||
Accept: ['*/*']
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
Authorization: [Bearer __MASTODON_PY_TEST_TOKEN]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['35']
|
||||
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":"99079266443928158","created_at":"2017-11-28T00:40:27.144Z","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/99079266443928158","content":"\u003cp\u003eToot
|
||||
number 0!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266443928158","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":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":17},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}'}
|
||||
headers:
|
||||
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
ETag: [W/"ab80e03560c9e6fad36def062b218446"]
|
||||
Transfer-Encoding: [chunked]
|
||||
Vary: ['Accept-Encoding, Origin']
|
||||
X-Content-Type-Options: [nosniff]
|
||||
X-Frame-Options: [SAMEORIGIN]
|
||||
X-Request-Id: [5f08ab8d-69b1-4da1-865d-fbcaaf824703]
|
||||
X-Runtime: ['0.065867']
|
||||
X-XSS-Protection: [1; mode=block]
|
||||
content-length: ['1214']
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: visibility=&status=Toot+number+1%21
|
||||
headers:
|
||||
Accept: ['*/*']
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
Authorization: [Bearer __MASTODON_PY_TEST_TOKEN]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['35']
|
||||
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":"99079266449069171","created_at":"2017-11-28T00:40:27.221Z","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/99079266449069171","content":"\u003cp\u003eToot
|
||||
number 1!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266449069171","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":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":18},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}'}
|
||||
headers:
|
||||
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
ETag: [W/"9f09060a4280232f4df6747da285fc93"]
|
||||
Transfer-Encoding: [chunked]
|
||||
Vary: ['Accept-Encoding, Origin']
|
||||
X-Content-Type-Options: [nosniff]
|
||||
X-Frame-Options: [SAMEORIGIN]
|
||||
X-Request-Id: [a62471ca-2e8a-45e7-b6bf-d4a68484f7e2]
|
||||
X-Runtime: ['0.058284']
|
||||
X-XSS-Protection: [1; mode=block]
|
||||
content-length: ['1214']
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: visibility=&status=Toot+number+2%21
|
||||
headers:
|
||||
Accept: ['*/*']
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
Authorization: [Bearer __MASTODON_PY_TEST_TOKEN]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['35']
|
||||
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":"99079266453672782","created_at":"2017-11-28T00:40:27.291Z","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/99079266453672782","content":"\u003cp\u003eToot
|
||||
number 2!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266453672782","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":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":19},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}'}
|
||||
headers:
|
||||
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
ETag: [W/"5e707659b98b65d212d51572864f15eb"]
|
||||
Transfer-Encoding: [chunked]
|
||||
Vary: ['Accept-Encoding, Origin']
|
||||
X-Content-Type-Options: [nosniff]
|
||||
X-Frame-Options: [SAMEORIGIN]
|
||||
X-Request-Id: [e8d9dc5c-4368-4d62-9b77-5171c61a505d]
|
||||
X-Runtime: ['0.055975']
|
||||
X-XSS-Protection: [1; mode=block]
|
||||
content-length: ['1214']
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: visibility=&status=Toot+number+3%21
|
||||
headers:
|
||||
Accept: ['*/*']
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
Authorization: [Bearer __MASTODON_PY_TEST_TOKEN]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['35']
|
||||
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":"99079266458487196","created_at":"2017-11-28T00:40:27.368Z","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/99079266458487196","content":"\u003cp\u003eToot
|
||||
number 3!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266458487196","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":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":20},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}'}
|
||||
headers:
|
||||
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
ETag: [W/"8b111c1866c6778c095c84171a195c46"]
|
||||
Transfer-Encoding: [chunked]
|
||||
Vary: ['Accept-Encoding, Origin']
|
||||
X-Content-Type-Options: [nosniff]
|
||||
X-Frame-Options: [SAMEORIGIN]
|
||||
X-Request-Id: [88575f0d-22eb-4bb0-b1f3-04b364ac8b8a]
|
||||
X-Runtime: ['0.063460']
|
||||
X-XSS-Protection: [1; mode=block]
|
||||
content-length: ['1214']
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: visibility=&status=Toot+number+4%21
|
||||
headers:
|
||||
Accept: ['*/*']
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
Authorization: [Bearer __MASTODON_PY_TEST_TOKEN]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['35']
|
||||
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":"99079266463508673","created_at":"2017-11-28T00:40:27.441Z","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/99079266463508673","content":"\u003cp\u003eToot
|
||||
number 4!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266463508673","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":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":21},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}'}
|
||||
headers:
|
||||
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
ETag: [W/"adabc0d5a0513decee43e97f9a073f58"]
|
||||
Transfer-Encoding: [chunked]
|
||||
Vary: ['Accept-Encoding, Origin']
|
||||
X-Content-Type-Options: [nosniff]
|
||||
X-Frame-Options: [SAMEORIGIN]
|
||||
X-Request-Id: [6a017227-82e0-402a-82d0-212d607b71c1]
|
||||
X-Runtime: ['0.056678']
|
||||
X-XSS-Protection: [1; mode=block]
|
||||
content-length: ['1214']
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: visibility=&status=Toot+number+5%21
|
||||
headers:
|
||||
Accept: ['*/*']
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
Authorization: [Bearer __MASTODON_PY_TEST_TOKEN]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['35']
|
||||
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":"99079266468357199","created_at":"2017-11-28T00:40:27.515Z","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/99079266468357199","content":"\u003cp\u003eToot
|
||||
number 5!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266468357199","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":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":22},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}'}
|
||||
headers:
|
||||
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
ETag: [W/"7dae03604470824cfb8100fa2ee86b8d"]
|
||||
Transfer-Encoding: [chunked]
|
||||
Vary: ['Accept-Encoding, Origin']
|
||||
X-Content-Type-Options: [nosniff]
|
||||
X-Frame-Options: [SAMEORIGIN]
|
||||
X-Request-Id: [76739fd1-b70e-4b34-839a-29cc5155eaa5]
|
||||
X-Runtime: ['0.060970']
|
||||
X-XSS-Protection: [1; mode=block]
|
||||
content-length: ['1214']
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: visibility=&status=Toot+number+6%21
|
||||
headers:
|
||||
Accept: ['*/*']
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
Authorization: [Bearer __MASTODON_PY_TEST_TOKEN]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['35']
|
||||
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":"99079266473226126","created_at":"2017-11-28T00:40:27.590Z","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/99079266473226126","content":"\u003cp\u003eToot
|
||||
number 6!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266473226126","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":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":23},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}'}
|
||||
headers:
|
||||
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
ETag: [W/"ca8426a2d601cc604f948bb8298c112d"]
|
||||
Transfer-Encoding: [chunked]
|
||||
Vary: ['Accept-Encoding, Origin']
|
||||
X-Content-Type-Options: [nosniff]
|
||||
X-Frame-Options: [SAMEORIGIN]
|
||||
X-Request-Id: [97c13c11-856c-41a9-a359-a38d042f8d9f]
|
||||
X-Runtime: ['0.056580']
|
||||
X-XSS-Protection: [1; mode=block]
|
||||
content-length: ['1214']
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: visibility=&status=Toot+number+7%21
|
||||
headers:
|
||||
Accept: ['*/*']
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
Authorization: [Bearer __MASTODON_PY_TEST_TOKEN]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['35']
|
||||
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":"99079266477946208","created_at":"2017-11-28T00:40:27.663Z","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/99079266477946208","content":"\u003cp\u003eToot
|
||||
number 7!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266477946208","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":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":24},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}'}
|
||||
headers:
|
||||
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
ETag: [W/"8c097f3e266820095fd8f153501c53c0"]
|
||||
Transfer-Encoding: [chunked]
|
||||
Vary: ['Accept-Encoding, Origin']
|
||||
X-Content-Type-Options: [nosniff]
|
||||
X-Frame-Options: [SAMEORIGIN]
|
||||
X-Request-Id: [c3990376-f7e9-476c-b3ee-579af6bed528]
|
||||
X-Runtime: ['0.060760']
|
||||
X-XSS-Protection: [1; mode=block]
|
||||
content-length: ['1214']
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: visibility=&status=Toot+number+8%21
|
||||
headers:
|
||||
Accept: ['*/*']
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
Authorization: [Bearer __MASTODON_PY_TEST_TOKEN]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['35']
|
||||
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":"99079266482935881","created_at":"2017-11-28T00:40:27.739Z","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/99079266482935881","content":"\u003cp\u003eToot
|
||||
number 8!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266482935881","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":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":25},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}'}
|
||||
headers:
|
||||
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
ETag: [W/"5cefc774d6133f67dcc7dd27ff08a281"]
|
||||
Transfer-Encoding: [chunked]
|
||||
Vary: ['Accept-Encoding, Origin']
|
||||
X-Content-Type-Options: [nosniff]
|
||||
X-Frame-Options: [SAMEORIGIN]
|
||||
X-Request-Id: [8ade0681-aed1-4d97-8e5f-80babe501e35]
|
||||
X-Runtime: ['0.056293']
|
||||
X-XSS-Protection: [1; mode=block]
|
||||
content-length: ['1214']
|
||||
status: {code: 200, message: OK}
|
||||
- request:
|
||||
body: visibility=&status=Toot+number+9%21
|
||||
headers:
|
||||
Accept: ['*/*']
|
||||
Accept-Encoding: ['gzip, deflate']
|
||||
Authorization: [Bearer __MASTODON_PY_TEST_TOKEN]
|
||||
Connection: [keep-alive]
|
||||
Content-Length: ['35']
|
||||
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":"99079266487775971","created_at":"2017-11-28T00:40:27.813Z","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/99079266487775971","content":"\u003cp\u003eToot
|
||||
number 9!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266487775971","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":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":26},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}'}
|
||||
headers:
|
||||
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
ETag: [W/"bd093b8c90d09ef1cb572b547f5aba34"]
|
||||
Transfer-Encoding: [chunked]
|
||||
Vary: ['Accept-Encoding, Origin']
|
||||
X-Content-Type-Options: [nosniff]
|
||||
X-Frame-Options: [SAMEORIGIN]
|
||||
X-Request-Id: [4325fdfa-46fb-4292-bcb7-ebeacbc73354]
|
||||
X-Runtime: ['0.059616']
|
||||
X-XSS-Protection: [1; mode=block]
|
||||
content-length: ['1214']
|
||||
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/accounts/1/statuses?limit=5
|
||||
response:
|
||||
body: {string: '[{"id":"99079266487775971","created_at":"2017-11-28T00:40:27.813Z","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/99079266487775971","content":"\u003cp\u003eToot
|
||||
number 9!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266487775971","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":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":26},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99079266482935881","created_at":"2017-11-28T00:40:27.739Z","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/99079266482935881","content":"\u003cp\u003eToot
|
||||
number 8!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266482935881","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":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":26},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99079266477946208","created_at":"2017-11-28T00:40:27.663Z","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/99079266477946208","content":"\u003cp\u003eToot
|
||||
number 7!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266477946208","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":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":26},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99079266473226126","created_at":"2017-11-28T00:40:27.590Z","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/99079266473226126","content":"\u003cp\u003eToot
|
||||
number 6!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266473226126","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":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":26},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99079266468357199","created_at":"2017-11-28T00:40:27.515Z","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/99079266468357199","content":"\u003cp\u003eToot
|
||||
number 5!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266468357199","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":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":26},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}]'}
|
||||
headers:
|
||||
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
ETag: [W/"3132abec6f7690c9856cfdabfc615e13"]
|
||||
Link: ['<http://localhost:3000/api/v1/accounts/1/statuses?limit=5&max_id=99079266468357199>;
|
||||
rel="next", <http://localhost:3000/api/v1/accounts/1/statuses?limit=5&since_id=99079266487775971>;
|
||||
rel="prev"']
|
||||
Transfer-Encoding: [chunked]
|
||||
Vary: ['Accept-Encoding, Origin']
|
||||
X-Content-Type-Options: [nosniff]
|
||||
X-Frame-Options: [SAMEORIGIN]
|
||||
X-Request-Id: [80031a41-25af-4d52-a683-05dfcb823934]
|
||||
X-Runtime: ['0.072870']
|
||||
X-XSS-Protection: [1; mode=block]
|
||||
content-length: ['6076']
|
||||
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/accounts/1/statuses?limit=5&max_id=99079266468357199
|
||||
response:
|
||||
body: {string: '[{"id":"99079266463508673","created_at":"2017-11-28T00:40:27.441Z","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/99079266463508673","content":"\u003cp\u003eToot
|
||||
number 4!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266463508673","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":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":26},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99079266458487196","created_at":"2017-11-28T00:40:27.368Z","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/99079266458487196","content":"\u003cp\u003eToot
|
||||
number 3!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266458487196","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":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":26},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99079266453672782","created_at":"2017-11-28T00:40:27.291Z","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/99079266453672782","content":"\u003cp\u003eToot
|
||||
number 2!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266453672782","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":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":26},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99079266449069171","created_at":"2017-11-28T00:40:27.221Z","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/99079266449069171","content":"\u003cp\u003eToot
|
||||
number 1!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266449069171","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":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":26},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99079266443928158","created_at":"2017-11-28T00:40:27.144Z","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/99079266443928158","content":"\u003cp\u003eToot
|
||||
number 0!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266443928158","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":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":26},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}]'}
|
||||
headers:
|
||||
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
ETag: [W/"6a5bd8ad4f648768d86a1a44297d4306"]
|
||||
Link: ['<http://localhost:3000/api/v1/accounts/1/statuses?limit=5&max_id=99079266443928158>;
|
||||
rel="next", <http://localhost:3000/api/v1/accounts/1/statuses?limit=5&since_id=99079266463508673>;
|
||||
rel="prev"']
|
||||
Transfer-Encoding: [chunked]
|
||||
Vary: ['Accept-Encoding, Origin']
|
||||
X-Content-Type-Options: [nosniff]
|
||||
X-Frame-Options: [SAMEORIGIN]
|
||||
X-Request-Id: [a67304e0-6c75-45a7-91eb-b520a571c8bd]
|
||||
X-Runtime: ['0.074569']
|
||||
X-XSS-Protection: [1; mode=block]
|
||||
content-length: ['6076']
|
||||
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/accounts/1/statuses?limit=5&since_id=99079266463508673
|
||||
response:
|
||||
body: {string: '[{"id":"99079266487775971","created_at":"2017-11-28T00:40:27.813Z","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/99079266487775971","content":"\u003cp\u003eToot
|
||||
number 9!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266487775971","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":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":26},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99079266482935881","created_at":"2017-11-28T00:40:27.739Z","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/99079266482935881","content":"\u003cp\u003eToot
|
||||
number 8!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266482935881","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":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":26},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99079266477946208","created_at":"2017-11-28T00:40:27.663Z","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/99079266477946208","content":"\u003cp\u003eToot
|
||||
number 7!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266477946208","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":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":26},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99079266473226126","created_at":"2017-11-28T00:40:27.590Z","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/99079266473226126","content":"\u003cp\u003eToot
|
||||
number 6!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266473226126","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":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":26},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99079266468357199","created_at":"2017-11-28T00:40:27.515Z","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/99079266468357199","content":"\u003cp\u003eToot
|
||||
number 5!\u003c/p\u003e","url":"http://localhost:3000/@admin/99079266468357199","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":"admin","locked":false,"created_at":"2017-08-02T04:15:27.248Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","avatar_static":"http://localhost:3000/system/accounts/avatars/000/000/001/original/69910b47243ddb47.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":2,"following_count":1,"statuses_count":26},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}]'}
|
||||
headers:
|
||||
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
ETag: [W/"373bc7dd35f45b24e6eb59480b80735e"]
|
||||
Link: ['<http://localhost:3000/api/v1/accounts/1/statuses?limit=5&max_id=99079266468357199>;
|
||||
rel="next", <http://localhost:3000/api/v1/accounts/1/statuses?limit=5&since_id=99079266487775971>;
|
||||
rel="prev"']
|
||||
Transfer-Encoding: [chunked]
|
||||
Vary: ['Accept-Encoding, Origin']
|
||||
X-Content-Type-Options: [nosniff]
|
||||
X-Frame-Options: [SAMEORIGIN]
|
||||
X-Request-Id: [cc6ab6a9-d2a3-4459-bce5-e59022342e9c]
|
||||
X-Runtime: ['0.078577']
|
||||
X-XSS-Protection: [1; mode=block]
|
||||
content-length: ['6076']
|
||||
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/99079266443928158
|
||||
response:
|
||||
body: {string: '{}'}
|
||||
headers:
|
||||
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
ETag: [W/"5dd893de28af93ba1caa26870546fdff"]
|
||||
Transfer-Encoding: [chunked]
|
||||
Vary: ['Accept-Encoding, Origin']
|
||||
X-Content-Type-Options: [nosniff]
|
||||
X-Frame-Options: [SAMEORIGIN]
|
||||
X-Request-Id: [f6b74838-006a-4e4e-8d6d-c1225462c2ee]
|
||||
X-Runtime: ['0.017958']
|
||||
X-XSS-Protection: [1; mode=block]
|
||||
content-length: ['2']
|
||||
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/99079266449069171
|
||||
response:
|
||||
body: {string: '{}'}
|
||||
headers:
|
||||
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
ETag: [W/"5dd893de28af93ba1caa26870546fdff"]
|
||||
Transfer-Encoding: [chunked]
|
||||
Vary: ['Accept-Encoding, Origin']
|
||||
X-Content-Type-Options: [nosniff]
|
||||
X-Frame-Options: [SAMEORIGIN]
|
||||
X-Request-Id: [62be2ede-17e2-4c99-a46c-d2e40dbc422f]
|
||||
X-Runtime: ['0.017751']
|
||||
X-XSS-Protection: [1; mode=block]
|
||||
content-length: ['2']
|
||||
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/99079266453672782
|
||||
response:
|
||||
body: {string: '{}'}
|
||||
headers:
|
||||
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
ETag: [W/"5dd893de28af93ba1caa26870546fdff"]
|
||||
Transfer-Encoding: [chunked]
|
||||
Vary: ['Accept-Encoding, Origin']
|
||||
X-Content-Type-Options: [nosniff]
|
||||
X-Frame-Options: [SAMEORIGIN]
|
||||
X-Request-Id: [2a2383b5-7c78-43ff-8b20-ea379546f309]
|
||||
X-Runtime: ['0.017311']
|
||||
X-XSS-Protection: [1; mode=block]
|
||||
content-length: ['2']
|
||||
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/99079266458487196
|
||||
response:
|
||||
body: {string: '{}'}
|
||||
headers:
|
||||
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
ETag: [W/"5dd893de28af93ba1caa26870546fdff"]
|
||||
Transfer-Encoding: [chunked]
|
||||
Vary: ['Accept-Encoding, Origin']
|
||||
X-Content-Type-Options: [nosniff]
|
||||
X-Frame-Options: [SAMEORIGIN]
|
||||
X-Request-Id: [264bba1c-6f8b-4ffb-b5ca-e790049dca9c]
|
||||
X-Runtime: ['0.017539']
|
||||
X-XSS-Protection: [1; mode=block]
|
||||
content-length: ['2']
|
||||
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/99079266463508673
|
||||
response:
|
||||
body: {string: '{}'}
|
||||
headers:
|
||||
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
ETag: [W/"5dd893de28af93ba1caa26870546fdff"]
|
||||
Transfer-Encoding: [chunked]
|
||||
Vary: ['Accept-Encoding, Origin']
|
||||
X-Content-Type-Options: [nosniff]
|
||||
X-Frame-Options: [SAMEORIGIN]
|
||||
X-Request-Id: [19dd0bbc-3117-4f2d-a5cf-728a51fe2580]
|
||||
X-Runtime: ['0.016431']
|
||||
X-XSS-Protection: [1; mode=block]
|
||||
content-length: ['2']
|
||||
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/99079266468357199
|
||||
response:
|
||||
body: {string: '{}'}
|
||||
headers:
|
||||
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
ETag: [W/"5dd893de28af93ba1caa26870546fdff"]
|
||||
Transfer-Encoding: [chunked]
|
||||
Vary: ['Accept-Encoding, Origin']
|
||||
X-Content-Type-Options: [nosniff]
|
||||
X-Frame-Options: [SAMEORIGIN]
|
||||
X-Request-Id: [6b06cffa-8525-4bc1-b2e7-1d961aab86c8]
|
||||
X-Runtime: ['0.017450']
|
||||
X-XSS-Protection: [1; mode=block]
|
||||
content-length: ['2']
|
||||
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/99079266473226126
|
||||
response:
|
||||
body: {string: '{}'}
|
||||
headers:
|
||||
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
ETag: [W/"5dd893de28af93ba1caa26870546fdff"]
|
||||
Transfer-Encoding: [chunked]
|
||||
Vary: ['Accept-Encoding, Origin']
|
||||
X-Content-Type-Options: [nosniff]
|
||||
X-Frame-Options: [SAMEORIGIN]
|
||||
X-Request-Id: [32ec46dd-30da-49e0-b274-6502febaf918]
|
||||
X-Runtime: ['0.017414']
|
||||
X-XSS-Protection: [1; mode=block]
|
||||
content-length: ['2']
|
||||
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/99079266477946208
|
||||
response:
|
||||
body: {string: '{}'}
|
||||
headers:
|
||||
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
ETag: [W/"5dd893de28af93ba1caa26870546fdff"]
|
||||
Transfer-Encoding: [chunked]
|
||||
Vary: ['Accept-Encoding, Origin']
|
||||
X-Content-Type-Options: [nosniff]
|
||||
X-Frame-Options: [SAMEORIGIN]
|
||||
X-Request-Id: [2ba3e408-6205-4ffa-ba7e-335e21e5a2b3]
|
||||
X-Runtime: ['0.022490']
|
||||
X-XSS-Protection: [1; mode=block]
|
||||
content-length: ['2']
|
||||
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/99079266482935881
|
||||
response:
|
||||
body: {string: '{}'}
|
||||
headers:
|
||||
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
ETag: [W/"5dd893de28af93ba1caa26870546fdff"]
|
||||
Transfer-Encoding: [chunked]
|
||||
Vary: ['Accept-Encoding, Origin']
|
||||
X-Content-Type-Options: [nosniff]
|
||||
X-Frame-Options: [SAMEORIGIN]
|
||||
X-Request-Id: [a3f3cfc2-6642-433d-b133-0d1d93ca6b25]
|
||||
X-Runtime: ['0.019183']
|
||||
X-XSS-Protection: [1; mode=block]
|
||||
content-length: ['2']
|
||||
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/99079266487775971
|
||||
response:
|
||||
body: {string: '{}'}
|
||||
headers:
|
||||
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||
Content-Type: [application/json; charset=utf-8]
|
||||
ETag: [W/"5dd893de28af93ba1caa26870546fdff"]
|
||||
Transfer-Encoding: [chunked]
|
||||
Vary: ['Accept-Encoding, Origin']
|
||||
X-Content-Type-Options: [nosniff]
|
||||
X-Frame-Options: [SAMEORIGIN]
|
||||
X-Request-Id: [051f2e76-14c4-467a-a5bc-fc0e61b160ba]
|
||||
X-Runtime: ['0.018877']
|
||||
X-XSS-Protection: [1; mode=block]
|
||||
content-length: ['2']
|
||||
status: {code: 200, message: OK}
|
||||
version: 1
|
24
tests/test_pagination.py
Normal file
24
tests/test_pagination.py
Normal file
|
@ -0,0 +1,24 @@
|
|||
import pytest
|
||||
from contextlib import contextmanager
|
||||
|
||||
|
||||
@contextmanager
|
||||
def many_statuses(api, n=10):
|
||||
statuses = list()
|
||||
for i in range(n):
|
||||
status = api.status_post("Toot number {}!".format(i))
|
||||
statuses.append(status)
|
||||
yield statuses
|
||||
for status in statuses:
|
||||
api.status_delete(status['id'])
|
||||
|
||||
|
||||
@pytest.mark.vcr()
|
||||
def test_fetch_next_previous(api):
|
||||
account = api.account_verify_credentials()
|
||||
with many_statuses(api):
|
||||
statuses = api.account_statuses(account['id'], limit=5)
|
||||
next_statuses = api.fetch_next(statuses)
|
||||
assert next_statuses
|
||||
previous_statuses = api.fetch_previous(next_statuses)
|
||||
assert previous_statuses
|
Loading…
Referencia en una nova incidència