commit
7e3a4a17a2
S'han modificat 36 arxius amb 2007 adicions i 92 eliminacions
|
@ -24,9 +24,9 @@ This test suite uses [VCR.py][] to record requests to Mastodon and replay them i
|
||||||
|
|
||||||
If you want to add or change tests, you will need a Mastodon development server running on `http://localhost:3000`, with the default `admin` user and default password.
|
If you want to add or change tests, you will need a Mastodon development server running on `http://localhost:3000`, with the default `admin` user and default password.
|
||||||
|
|
||||||
It also needs a test OAuth app to be set up by applying the provided `setup_app.sql` to Mastodon's database:
|
It also needs a test OAuth app and an additional test user to be set up by applying the provided `setup.sql` to Mastodon's database:
|
||||||
|
|
||||||
psql -d mastodon_development < tests/setup_app.sql
|
psql -d mastodon_development < tests/setup.sql
|
||||||
|
|
||||||
Tests that send requests to Mastodon should be marked as needing VCR with the `pytest.mark.vcr` decorator.
|
Tests that send requests to Mastodon should be marked as needing VCR with the `pytest.mark.vcr` decorator.
|
||||||
|
|
||||||
|
|
28
tests/cassettes/test_account.yaml
Normal file
28
tests/cassettes/test_account.yaml
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
interactions:
|
||||||
|
- request:
|
||||||
|
body: null
|
||||||
|
headers:
|
||||||
|
Accept: ['*/*']
|
||||||
|
Accept-Encoding: ['gzip, deflate']
|
||||||
|
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
|
||||||
|
Connection: [keep-alive]
|
||||||
|
User-Agent: [python-requests/2.18.4]
|
||||||
|
method: GET
|
||||||
|
uri: http://localhost:3000/api/v1/accounts/1
|
||||||
|
response:
|
||||||
|
body: {string: '{"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":50}'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"e9bdeb1ccc287b8c6a125f2e31149bc2"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [8131bec0-f48e-4786-8ead-21a2c0e5cf98]
|
||||||
|
X-Runtime: ['0.047639']
|
||||||
|
X-XSS-Protection: [1; mode=block]
|
||||||
|
content-length: ['603']
|
||||||
|
status: {code: 200, message: OK}
|
||||||
|
version: 1
|
54
tests/cassettes/test_account_block_unblock.yaml
Normal file
54
tests/cassettes/test_account_block_unblock.yaml
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
interactions:
|
||||||
|
- request:
|
||||||
|
body: null
|
||||||
|
headers:
|
||||||
|
Accept: ['*/*']
|
||||||
|
Accept-Encoding: ['gzip, deflate']
|
||||||
|
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
|
||||||
|
Connection: [keep-alive]
|
||||||
|
Content-Length: ['0']
|
||||||
|
User-Agent: [python-requests/2.18.4]
|
||||||
|
method: POST
|
||||||
|
uri: http://localhost:3000/api/v1/accounts/1/block
|
||||||
|
response:
|
||||||
|
body: {string: '{"id":"1","following":false,"followed_by":false,"blocking":true,"muting":false,"requested":false,"domain_blocking":false}'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"196f57518cd8daf5bce592dcd6f9e402"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [d2ead4fd-9233-404a-ac03-9cdab005b409]
|
||||||
|
X-Runtime: ['0.076978']
|
||||||
|
X-XSS-Protection: [1; mode=block]
|
||||||
|
content-length: ['121']
|
||||||
|
status: {code: 200, message: OK}
|
||||||
|
- request:
|
||||||
|
body: null
|
||||||
|
headers:
|
||||||
|
Accept: ['*/*']
|
||||||
|
Accept-Encoding: ['gzip, deflate']
|
||||||
|
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
|
||||||
|
Connection: [keep-alive]
|
||||||
|
Content-Length: ['0']
|
||||||
|
User-Agent: [python-requests/2.18.4]
|
||||||
|
method: POST
|
||||||
|
uri: http://localhost:3000/api/v1/accounts/1/unblock
|
||||||
|
response:
|
||||||
|
body: {string: '{"id":"1","following":false,"followed_by":false,"blocking":false,"muting":false,"requested":false,"domain_blocking":false}'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"05e46d89ddd4fee200b318b7343c32b4"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [0bfca911-f078-42b1-a476-00f9c6d3b13d]
|
||||||
|
X-Runtime: ['0.041180']
|
||||||
|
X-XSS-Protection: [1; mode=block]
|
||||||
|
content-length: ['122']
|
||||||
|
status: {code: 200, message: OK}
|
||||||
|
version: 1
|
54
tests/cassettes/test_account_follow_unfollow.yaml
Normal file
54
tests/cassettes/test_account_follow_unfollow.yaml
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
interactions:
|
||||||
|
- request:
|
||||||
|
body: null
|
||||||
|
headers:
|
||||||
|
Accept: ['*/*']
|
||||||
|
Accept-Encoding: ['gzip, deflate']
|
||||||
|
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
|
||||||
|
Connection: [keep-alive]
|
||||||
|
Content-Length: ['0']
|
||||||
|
User-Agent: [python-requests/2.18.4]
|
||||||
|
method: POST
|
||||||
|
uri: http://localhost:3000/api/v1/accounts/1/follow
|
||||||
|
response:
|
||||||
|
body: {string: '{"id":"1","following":true,"followed_by":false,"blocking":false,"muting":false,"requested":false,"domain_blocking":false}'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"54ee9a8f552ca13f2eb48913ddfa66b6"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [74b7ca00-cec6-4673-a6f7-00e340e5299f]
|
||||||
|
X-Runtime: ['0.155400']
|
||||||
|
X-XSS-Protection: [1; mode=block]
|
||||||
|
content-length: ['121']
|
||||||
|
status: {code: 200, message: OK}
|
||||||
|
- request:
|
||||||
|
body: null
|
||||||
|
headers:
|
||||||
|
Accept: ['*/*']
|
||||||
|
Accept-Encoding: ['gzip, deflate']
|
||||||
|
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
|
||||||
|
Connection: [keep-alive]
|
||||||
|
Content-Length: ['0']
|
||||||
|
User-Agent: [python-requests/2.18.4]
|
||||||
|
method: POST
|
||||||
|
uri: http://localhost:3000/api/v1/accounts/1/unfollow
|
||||||
|
response:
|
||||||
|
body: {string: '{"id":"1","following":false,"followed_by":false,"blocking":false,"muting":false,"requested":false,"domain_blocking":false}'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"0f18b5b45430f24d88fd4f352cdf3e0d"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [75185a80-e13e-4620-89c1-d368db67b22c]
|
||||||
|
X-Runtime: ['0.094960']
|
||||||
|
X-XSS-Protection: [1; mode=block]
|
||||||
|
content-length: ['122']
|
||||||
|
status: {code: 200, message: OK}
|
||||||
|
version: 1
|
28
tests/cassettes/test_account_followers.yaml
Normal file
28
tests/cassettes/test_account_followers.yaml
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
interactions:
|
||||||
|
- request:
|
||||||
|
body: null
|
||||||
|
headers:
|
||||||
|
Accept: ['*/*']
|
||||||
|
Accept-Encoding: ['gzip, deflate']
|
||||||
|
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
|
||||||
|
Connection: [keep-alive]
|
||||||
|
User-Agent: [python-requests/2.18.4]
|
||||||
|
method: GET
|
||||||
|
uri: http://localhost:3000/api/v1/accounts/1/followers
|
||||||
|
response:
|
||||||
|
body: {string: '[{"id":"3","username":"codl","acct":"codl","display_name":"","locked":false,"created_at":"2017-11-14T11:40:31.289Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@codl","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":1,"statuses_count":3}]'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"0fbc972d9b8f61435fef831aa4a846d3"]
|
||||||
|
Link: ['<http://localhost:3000/api/v1/accounts/1/followers?since_id=1>; rel="prev"']
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [c83243ad-be5c-4b16-acfc-5a18e80b7a88]
|
||||||
|
X-Runtime: ['0.039199']
|
||||||
|
X-XSS-Protection: [1; mode=block]
|
||||||
|
content-length: ['511']
|
||||||
|
status: {code: 200, message: OK}
|
||||||
|
version: 1
|
27
tests/cassettes/test_account_following.yaml
Normal file
27
tests/cassettes/test_account_following.yaml
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
interactions:
|
||||||
|
- request:
|
||||||
|
body: null
|
||||||
|
headers:
|
||||||
|
Accept: ['*/*']
|
||||||
|
Accept-Encoding: ['gzip, deflate']
|
||||||
|
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
|
||||||
|
Connection: [keep-alive]
|
||||||
|
User-Agent: [python-requests/2.18.4]
|
||||||
|
method: GET
|
||||||
|
uri: http://localhost:3000/api/v1/accounts/1/following
|
||||||
|
response:
|
||||||
|
body: {string: '[]'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"c52068b0fe39c86669dce2267d90925e"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [9df6a517-2e2e-499b-b0a5-0b1d6cea9f1a]
|
||||||
|
X-Runtime: ['0.037545']
|
||||||
|
X-XSS-Protection: [1; mode=block]
|
||||||
|
content-length: ['2']
|
||||||
|
status: {code: 200, message: OK}
|
||||||
|
version: 1
|
54
tests/cassettes/test_account_mute_unmute.yaml
Normal file
54
tests/cassettes/test_account_mute_unmute.yaml
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
interactions:
|
||||||
|
- request:
|
||||||
|
body: null
|
||||||
|
headers:
|
||||||
|
Accept: ['*/*']
|
||||||
|
Accept-Encoding: ['gzip, deflate']
|
||||||
|
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
|
||||||
|
Connection: [keep-alive]
|
||||||
|
Content-Length: ['0']
|
||||||
|
User-Agent: [python-requests/2.18.4]
|
||||||
|
method: POST
|
||||||
|
uri: http://localhost:3000/api/v1/accounts/1/mute
|
||||||
|
response:
|
||||||
|
body: {string: '{"id":"1","following":false,"followed_by":false,"blocking":false,"muting":true,"requested":false,"domain_blocking":false}'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"29202955a4020108196abe86f9cd0179"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [45f28867-e291-4323-85fb-3f7a6f787a84]
|
||||||
|
X-Runtime: ['0.056882']
|
||||||
|
X-XSS-Protection: [1; mode=block]
|
||||||
|
content-length: ['121']
|
||||||
|
status: {code: 200, message: OK}
|
||||||
|
- request:
|
||||||
|
body: null
|
||||||
|
headers:
|
||||||
|
Accept: ['*/*']
|
||||||
|
Accept-Encoding: ['gzip, deflate']
|
||||||
|
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
|
||||||
|
Connection: [keep-alive]
|
||||||
|
Content-Length: ['0']
|
||||||
|
User-Agent: [python-requests/2.18.4]
|
||||||
|
method: POST
|
||||||
|
uri: http://localhost:3000/api/v1/accounts/1/unmute
|
||||||
|
response:
|
||||||
|
body: {string: '{"id":"1","following":false,"followed_by":false,"blocking":false,"muting":false,"requested":false,"domain_blocking":false}'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"05e46d89ddd4fee200b318b7343c32b4"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [2e3c386a-0ec4-46d6-9473-e47d242f91ce]
|
||||||
|
X-Runtime: ['0.041201']
|
||||||
|
X-XSS-Protection: [1; mode=block]
|
||||||
|
content-length: ['122']
|
||||||
|
status: {code: 200, message: OK}
|
||||||
|
version: 1
|
27
tests/cassettes/test_account_relationships.yaml
Normal file
27
tests/cassettes/test_account_relationships.yaml
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
interactions:
|
||||||
|
- request:
|
||||||
|
body: null
|
||||||
|
headers:
|
||||||
|
Accept: ['*/*']
|
||||||
|
Accept-Encoding: ['gzip, deflate']
|
||||||
|
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
|
||||||
|
Connection: [keep-alive]
|
||||||
|
User-Agent: [python-requests/2.18.4]
|
||||||
|
method: GET
|
||||||
|
uri: http://localhost:3000/api/v1/accounts/relationships?id=1
|
||||||
|
response:
|
||||||
|
body: {string: '[{"id":"1","following":false,"followed_by":false,"blocking":false,"muting":false,"requested":false,"domain_blocking":false}]'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"62305384b0a973eadd31ca6bca1133e9"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [825f3691-e858-4048-9dda-065917a2798a]
|
||||||
|
X-Runtime: ['0.031853']
|
||||||
|
X-XSS-Protection: [1; mode=block]
|
||||||
|
content-length: ['124']
|
||||||
|
status: {code: 200, message: OK}
|
||||||
|
version: 1
|
28
tests/cassettes/test_account_search.yaml
Normal file
28
tests/cassettes/test_account_search.yaml
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
interactions:
|
||||||
|
- request:
|
||||||
|
body: null
|
||||||
|
headers:
|
||||||
|
Accept: ['*/*']
|
||||||
|
Accept-Encoding: ['gzip, deflate']
|
||||||
|
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
|
||||||
|
Connection: [keep-alive]
|
||||||
|
User-Agent: [python-requests/2.18.4]
|
||||||
|
method: GET
|
||||||
|
uri: http://localhost:3000/api/v1/accounts/search?q=admin
|
||||||
|
response:
|
||||||
|
body: {string: '[{"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":50}]'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"f257564844f554885596d31ac16d0607"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [efde9755-3e09-4e66-89d3-ad28026d0a0a]
|
||||||
|
X-Runtime: ['0.047304']
|
||||||
|
X-XSS-Protection: [1; mode=block]
|
||||||
|
content-length: ['605']
|
||||||
|
status: {code: 200, message: OK}
|
||||||
|
version: 1
|
32
tests/cassettes/test_account_update_credentials.yaml
Normal file
32
tests/cassettes/test_account_update_credentials.yaml
Normal file
Las diferiencias del archivo han sido suprimidas porque una o mas lineas son muy largas
27
tests/cassettes/test_blocks.yaml
Normal file
27
tests/cassettes/test_blocks.yaml
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
interactions:
|
||||||
|
- request:
|
||||||
|
body: null
|
||||||
|
headers:
|
||||||
|
Accept: ['*/*']
|
||||||
|
Accept-Encoding: ['gzip, deflate']
|
||||||
|
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
|
||||||
|
Connection: [keep-alive]
|
||||||
|
User-Agent: [python-requests/2.18.4]
|
||||||
|
method: GET
|
||||||
|
uri: http://localhost:3000/api/v1/blocks
|
||||||
|
response:
|
||||||
|
body: {string: '[]'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"ada2bcb0a9805d2061319aaa5a76ddc2"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [8aecc6a6-3aa1-4da1-aa13-504300410e99]
|
||||||
|
X-Runtime: ['0.020203']
|
||||||
|
X-XSS-Protection: [1; mode=block]
|
||||||
|
content-length: ['2']
|
||||||
|
status: {code: 200, message: OK}
|
||||||
|
version: 1
|
56
tests/cassettes/test_domain_block_unblock.yaml
Normal file
56
tests/cassettes/test_domain_block_unblock.yaml
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
interactions:
|
||||||
|
- request:
|
||||||
|
body: domain=example.com
|
||||||
|
headers:
|
||||||
|
Accept: ['*/*']
|
||||||
|
Accept-Encoding: ['gzip, deflate']
|
||||||
|
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
|
||||||
|
Connection: [keep-alive]
|
||||||
|
Content-Length: ['18']
|
||||||
|
Content-Type: [application/x-www-form-urlencoded]
|
||||||
|
User-Agent: [python-requests/2.18.4]
|
||||||
|
method: POST
|
||||||
|
uri: http://localhost:3000/api/v1/domain_blocks
|
||||||
|
response:
|
||||||
|
body: {string: '{}'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"fe7f6d5b13e22f37fb57de6e31e0ef11"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [cb5c8333-c6bd-41c3-bdfd-d6c974ea7d2b]
|
||||||
|
X-Runtime: ['0.059619']
|
||||||
|
X-XSS-Protection: [1; mode=block]
|
||||||
|
content-length: ['2']
|
||||||
|
status: {code: 200, message: OK}
|
||||||
|
- request:
|
||||||
|
body: domain=example.com
|
||||||
|
headers:
|
||||||
|
Accept: ['*/*']
|
||||||
|
Accept-Encoding: ['gzip, deflate']
|
||||||
|
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
|
||||||
|
Connection: [keep-alive]
|
||||||
|
Content-Length: ['18']
|
||||||
|
Content-Type: [application/x-www-form-urlencoded]
|
||||||
|
User-Agent: [python-requests/2.18.4]
|
||||||
|
method: DELETE
|
||||||
|
uri: http://localhost:3000/api/v1/domain_blocks
|
||||||
|
response:
|
||||||
|
body: {string: '{}'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"fe7f6d5b13e22f37fb57de6e31e0ef11"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [56395cbf-814c-4e57-97fd-2c44592211aa]
|
||||||
|
X-Runtime: ['0.019281']
|
||||||
|
X-XSS-Protection: [1; mode=block]
|
||||||
|
content-length: ['2']
|
||||||
|
status: {code: 200, message: OK}
|
||||||
|
version: 1
|
27
tests/cassettes/test_domain_blocks.yaml
Normal file
27
tests/cassettes/test_domain_blocks.yaml
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
interactions:
|
||||||
|
- request:
|
||||||
|
body: null
|
||||||
|
headers:
|
||||||
|
Accept: ['*/*']
|
||||||
|
Accept-Encoding: ['gzip, deflate']
|
||||||
|
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
|
||||||
|
Connection: [keep-alive]
|
||||||
|
User-Agent: [python-requests/2.18.4]
|
||||||
|
method: GET
|
||||||
|
uri: http://localhost:3000/api/v1/domain_blocks
|
||||||
|
response:
|
||||||
|
body: {string: '[]'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"4fdefc2aac1c40f3865259d9f3074aec"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [d7fec252-2898-46a1-a538-0e5ecda88fa8]
|
||||||
|
X-Runtime: ['0.032291']
|
||||||
|
X-XSS-Protection: [1; mode=block]
|
||||||
|
content-length: ['2']
|
||||||
|
status: {code: 200, message: OK}
|
||||||
|
version: 1
|
27
tests/cassettes/test_favourites.yaml
Normal file
27
tests/cassettes/test_favourites.yaml
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
interactions:
|
||||||
|
- request:
|
||||||
|
body: null
|
||||||
|
headers:
|
||||||
|
Accept: ['*/*']
|
||||||
|
Accept-Encoding: ['gzip, deflate']
|
||||||
|
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
|
||||||
|
Connection: [keep-alive]
|
||||||
|
User-Agent: [python-requests/2.18.4]
|
||||||
|
method: GET
|
||||||
|
uri: http://localhost:3000/api/v1/favourites
|
||||||
|
response:
|
||||||
|
body: {string: '[]'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"81bd415584c93a9b65e719202c32c8f6"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [0cc085dc-b2c7-4524-9dbf-4b9449f4aa79]
|
||||||
|
X-Runtime: ['0.029419']
|
||||||
|
X-XSS-Protection: [1; mode=block]
|
||||||
|
content-length: ['2']
|
||||||
|
status: {code: 200, message: OK}
|
||||||
|
version: 1
|
|
@ -0,0 +1,691 @@
|
||||||
|
interactions:
|
||||||
|
- request:
|
||||||
|
body: null
|
||||||
|
headers:
|
||||||
|
Accept: ['*/*']
|
||||||
|
Accept-Encoding: ['gzip, deflate']
|
||||||
|
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_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":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":20,"source":{"privacy":"public","sensitive":false,"note":""}}'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"4b747af8fb1928ac9858bcc2b0e22a7f"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [de81f4f7-5f37-4aba-b268-7468fc7a8443]
|
||||||
|
X-Runtime: ['0.024952']
|
||||||
|
X-XSS-Protection: [1; mode=block]
|
||||||
|
content-length: ['616']
|
||||||
|
status: {code: 200, message: OK}
|
||||||
|
- request:
|
||||||
|
body: visibility=&status=Toot+number+0%21
|
||||||
|
headers:
|
||||||
|
Accept: ['*/*']
|
||||||
|
Accept-Encoding: ['gzip, deflate']
|
||||||
|
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_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":"99090169099991050","created_at":"2017-11-29T22:53:08.475Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169099991050","content":"\u003cp\u003eToot
|
||||||
|
number 0!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169099991050","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":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":21},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"31c3bf74ee8f6bbc558d0b85667b246a"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [63986810-71bd-48ff-b58f-d207362e0ccc]
|
||||||
|
X-Runtime: ['0.085776']
|
||||||
|
X-XSS-Protection: [1; mode=block]
|
||||||
|
content-length: ['1200']
|
||||||
|
status: {code: 200, message: OK}
|
||||||
|
- request:
|
||||||
|
body: visibility=&status=Toot+number+1%21
|
||||||
|
headers:
|
||||||
|
Accept: ['*/*']
|
||||||
|
Accept-Encoding: ['gzip, deflate']
|
||||||
|
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_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":"99090169112505641","created_at":"2017-11-29T22:53:08.693Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169112505641","content":"\u003cp\u003eToot
|
||||||
|
number 1!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169112505641","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":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":22},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"6f26b4b8036a07596b93a1888fd498a4"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [3f6b3829-d2b1-4157-bc8c-342b12b3c034]
|
||||||
|
X-Runtime: ['0.251929']
|
||||||
|
X-XSS-Protection: [1; mode=block]
|
||||||
|
content-length: ['1200']
|
||||||
|
status: {code: 200, message: OK}
|
||||||
|
- request:
|
||||||
|
body: visibility=&status=Toot+number+2%21
|
||||||
|
headers:
|
||||||
|
Accept: ['*/*']
|
||||||
|
Accept-Encoding: ['gzip, deflate']
|
||||||
|
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_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":"99090169128453211","created_at":"2017-11-29T22:53:08.920Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169128453211","content":"\u003cp\u003eToot
|
||||||
|
number 2!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169128453211","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":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":23},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"0fee586c008116286a8cf993df17dfbb"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [0264f655-6431-4aaa-8677-344dd79d7b00]
|
||||||
|
X-Runtime: ['0.234121']
|
||||||
|
X-XSS-Protection: [1; mode=block]
|
||||||
|
content-length: ['1200']
|
||||||
|
status: {code: 200, message: OK}
|
||||||
|
- request:
|
||||||
|
body: visibility=&status=Toot+number+3%21
|
||||||
|
headers:
|
||||||
|
Accept: ['*/*']
|
||||||
|
Accept-Encoding: ['gzip, deflate']
|
||||||
|
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_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":"99090169144720352","created_at":"2017-11-29T22:53:09.165Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169144720352","content":"\u003cp\u003eToot
|
||||||
|
number 3!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169144720352","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":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":24},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"312c11e44d15b19394c2d2f8b87fb958"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [36e178d0-918c-400c-a2b6-33e556e4b28a]
|
||||||
|
X-Runtime: ['0.163709']
|
||||||
|
X-XSS-Protection: [1; mode=block]
|
||||||
|
content-length: ['1200']
|
||||||
|
status: {code: 200, message: OK}
|
||||||
|
- request:
|
||||||
|
body: visibility=&status=Toot+number+4%21
|
||||||
|
headers:
|
||||||
|
Accept: ['*/*']
|
||||||
|
Accept-Encoding: ['gzip, deflate']
|
||||||
|
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_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":"99090169157818918","created_at":"2017-11-29T22:53:09.365Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169157818918","content":"\u003cp\u003eToot
|
||||||
|
number 4!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169157818918","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":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":25},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"9d0e323fe686c1f62c4d61491bf3b204"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [e6187237-7a87-493c-9aac-2548a8ea774b]
|
||||||
|
X-Runtime: ['0.172394']
|
||||||
|
X-XSS-Protection: [1; mode=block]
|
||||||
|
content-length: ['1200']
|
||||||
|
status: {code: 200, message: OK}
|
||||||
|
- request:
|
||||||
|
body: visibility=&status=Toot+number+5%21
|
||||||
|
headers:
|
||||||
|
Accept: ['*/*']
|
||||||
|
Accept-Encoding: ['gzip, deflate']
|
||||||
|
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_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":"99090169171463026","created_at":"2017-11-29T22:53:09.574Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169171463026","content":"\u003cp\u003eToot
|
||||||
|
number 5!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169171463026","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":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":26},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"c2a56972ac6908e7ff9e236735c612d9"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [9585c667-3c7b-484e-811a-d69cb2e7d621]
|
||||||
|
X-Runtime: ['0.128772']
|
||||||
|
X-XSS-Protection: [1; mode=block]
|
||||||
|
content-length: ['1200']
|
||||||
|
status: {code: 200, message: OK}
|
||||||
|
- request:
|
||||||
|
body: visibility=&status=Toot+number+6%21
|
||||||
|
headers:
|
||||||
|
Accept: ['*/*']
|
||||||
|
Accept-Encoding: ['gzip, deflate']
|
||||||
|
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_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":"99090169180477526","created_at":"2017-11-29T22:53:09.710Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169180477526","content":"\u003cp\u003eToot
|
||||||
|
number 6!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169180477526","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":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":27},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"62666997b986482efe88650c647f366b"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [32dd2d5b-5015-494d-8385-b30854ac6190]
|
||||||
|
X-Runtime: ['0.114435']
|
||||||
|
X-XSS-Protection: [1; mode=block]
|
||||||
|
content-length: ['1200']
|
||||||
|
status: {code: 200, message: OK}
|
||||||
|
- request:
|
||||||
|
body: visibility=&status=Toot+number+7%21
|
||||||
|
headers:
|
||||||
|
Accept: ['*/*']
|
||||||
|
Accept-Encoding: ['gzip, deflate']
|
||||||
|
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_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":"99090169189662625","created_at":"2017-11-29T22:53:09.844Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169189662625","content":"\u003cp\u003eToot
|
||||||
|
number 7!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169189662625","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":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":28},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"377f18cd9452c6f3d8ef359fc41f9013"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [33450ea9-f12c-4482-823d-2ba30a88b660]
|
||||||
|
X-Runtime: ['0.089887']
|
||||||
|
X-XSS-Protection: [1; mode=block]
|
||||||
|
content-length: ['1200']
|
||||||
|
status: {code: 200, message: OK}
|
||||||
|
- request:
|
||||||
|
body: visibility=&status=Toot+number+8%21
|
||||||
|
headers:
|
||||||
|
Accept: ['*/*']
|
||||||
|
Accept-Encoding: ['gzip, deflate']
|
||||||
|
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_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":"99090169197421619","created_at":"2017-11-29T22:53:09.966Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169197421619","content":"\u003cp\u003eToot
|
||||||
|
number 8!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169197421619","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":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":29},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"ccd9332c636650c9949000ad56d5137c"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [4dc5848e-55d3-4e0a-b153-f4ffefb7bf60]
|
||||||
|
X-Runtime: ['0.101311']
|
||||||
|
X-XSS-Protection: [1; mode=block]
|
||||||
|
content-length: ['1200']
|
||||||
|
status: {code: 200, message: OK}
|
||||||
|
- request:
|
||||||
|
body: visibility=&status=Toot+number+9%21
|
||||||
|
headers:
|
||||||
|
Accept: ['*/*']
|
||||||
|
Accept-Encoding: ['gzip, deflate']
|
||||||
|
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_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":"99090169205393273","created_at":"2017-11-29T22:53:10.092Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169205393273","content":"\u003cp\u003eToot
|
||||||
|
number 9!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169205393273","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":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":30},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"e6e095218cb47903adf5dccd46b07371"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [3477c926-1e8d-4db4-80c4-ccf6069505bd]
|
||||||
|
X-Runtime: ['0.103342']
|
||||||
|
X-XSS-Protection: [1; mode=block]
|
||||||
|
content-length: ['1200']
|
||||||
|
status: {code: 200, message: OK}
|
||||||
|
- request:
|
||||||
|
body: null
|
||||||
|
headers:
|
||||||
|
Accept: ['*/*']
|
||||||
|
Accept-Encoding: ['gzip, deflate']
|
||||||
|
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
|
||||||
|
Connection: [keep-alive]
|
||||||
|
User-Agent: [python-requests/2.18.4]
|
||||||
|
method: GET
|
||||||
|
uri: http://localhost:3000/api/v1/accounts/1234567890123456/statuses?limit=5
|
||||||
|
response:
|
||||||
|
body: {string: '[{"id":"99090169205393273","created_at":"2017-11-29T22:53:10.092Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169205393273","content":"\u003cp\u003eToot
|
||||||
|
number 9!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169205393273","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":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":30},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99090169197421619","created_at":"2017-11-29T22:53:09.966Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169197421619","content":"\u003cp\u003eToot
|
||||||
|
number 8!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169197421619","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":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":30},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99090169189662625","created_at":"2017-11-29T22:53:09.844Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169189662625","content":"\u003cp\u003eToot
|
||||||
|
number 7!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169189662625","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":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":30},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99090169180477526","created_at":"2017-11-29T22:53:09.710Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169180477526","content":"\u003cp\u003eToot
|
||||||
|
number 6!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169180477526","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":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":30},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99090169171463026","created_at":"2017-11-29T22:53:09.574Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169171463026","content":"\u003cp\u003eToot
|
||||||
|
number 5!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169171463026","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":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":30},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}]'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"8895892d066fff08c6249a6f99ed804e"]
|
||||||
|
Link: ['<http://localhost:3000/api/v1/accounts/1234567890123456/statuses?limit=5&max_id=99090169171463026>;
|
||||||
|
rel="next", <http://localhost:3000/api/v1/accounts/1234567890123456/statuses?limit=5&since_id=99090169205393273>;
|
||||||
|
rel="prev"']
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [b53e01ba-de3b-4353-9b7a-144af19ad0de]
|
||||||
|
X-Runtime: ['0.131082']
|
||||||
|
X-XSS-Protection: [1; mode=block]
|
||||||
|
content-length: ['6006']
|
||||||
|
status: {code: 200, message: OK}
|
||||||
|
- request:
|
||||||
|
body: null
|
||||||
|
headers:
|
||||||
|
Accept: ['*/*']
|
||||||
|
Accept-Encoding: ['gzip, deflate']
|
||||||
|
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
|
||||||
|
Connection: [keep-alive]
|
||||||
|
User-Agent: [python-requests/2.18.4]
|
||||||
|
method: GET
|
||||||
|
uri: http://localhost:3000/api/v1/accounts/1234567890123456/statuses?limit=5&max_id=99090169171463026
|
||||||
|
response:
|
||||||
|
body: {string: '[{"id":"99090169157818918","created_at":"2017-11-29T22:53:09.365Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169157818918","content":"\u003cp\u003eToot
|
||||||
|
number 4!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169157818918","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":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":30},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99090169144720352","created_at":"2017-11-29T22:53:09.165Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169144720352","content":"\u003cp\u003eToot
|
||||||
|
number 3!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169144720352","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":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":30},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99090169128453211","created_at":"2017-11-29T22:53:08.920Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169128453211","content":"\u003cp\u003eToot
|
||||||
|
number 2!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169128453211","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":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":30},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99090169112505641","created_at":"2017-11-29T22:53:08.693Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169112505641","content":"\u003cp\u003eToot
|
||||||
|
number 1!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169112505641","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":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":30},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99090169099991050","created_at":"2017-11-29T22:53:08.475Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169099991050","content":"\u003cp\u003eToot
|
||||||
|
number 0!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169099991050","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":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":30},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}]'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"97e6bf689b55a05c69636d224d96a4a1"]
|
||||||
|
Link: ['<http://localhost:3000/api/v1/accounts/1234567890123456/statuses?limit=5&max_id=99090169099991050>;
|
||||||
|
rel="next", <http://localhost:3000/api/v1/accounts/1234567890123456/statuses?limit=5&since_id=99090169157818918>;
|
||||||
|
rel="prev"']
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [b13d0162-1982-460a-9c3d-65e7542fcd01]
|
||||||
|
X-Runtime: ['0.168006']
|
||||||
|
X-XSS-Protection: [1; mode=block]
|
||||||
|
content-length: ['6006']
|
||||||
|
status: {code: 200, message: OK}
|
||||||
|
- request:
|
||||||
|
body: null
|
||||||
|
headers:
|
||||||
|
Accept: ['*/*']
|
||||||
|
Accept-Encoding: ['gzip, deflate']
|
||||||
|
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
|
||||||
|
Connection: [keep-alive]
|
||||||
|
User-Agent: [python-requests/2.18.4]
|
||||||
|
method: GET
|
||||||
|
uri: http://localhost:3000/api/v1/accounts/1234567890123456/statuses?limit=5&since_id=99090169157818918
|
||||||
|
response:
|
||||||
|
body: {string: '[{"id":"99090169205393273","created_at":"2017-11-29T22:53:10.092Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169205393273","content":"\u003cp\u003eToot
|
||||||
|
number 9!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169205393273","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":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":30},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99090169197421619","created_at":"2017-11-29T22:53:09.966Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169197421619","content":"\u003cp\u003eToot
|
||||||
|
number 8!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169197421619","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":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":30},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99090169189662625","created_at":"2017-11-29T22:53:09.844Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169189662625","content":"\u003cp\u003eToot
|
||||||
|
number 7!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169189662625","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":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":30},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99090169180477526","created_at":"2017-11-29T22:53:09.710Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169180477526","content":"\u003cp\u003eToot
|
||||||
|
number 6!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169180477526","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":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":30},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]},{"id":"99090169171463026","created_at":"2017-11-29T22:53:09.574Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"en","uri":"http://localhost:3000/users/mastodonpy_test/statuses/99090169171463026","content":"\u003cp\u003eToot
|
||||||
|
number 5!\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test/99090169171463026","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":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":false,"created_at":"2017-11-29T21:50:20.372Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":30},"media_attachments":[],"mentions":[],"tags":[],"emojis":[]}]'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"8895892d066fff08c6249a6f99ed804e"]
|
||||||
|
Link: ['<http://localhost:3000/api/v1/accounts/1234567890123456/statuses?limit=5&max_id=99090169171463026>;
|
||||||
|
rel="next", <http://localhost:3000/api/v1/accounts/1234567890123456/statuses?limit=5&since_id=99090169205393273>;
|
||||||
|
rel="prev"']
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [14fbab65-eeb3-4dda-8520-3ccb3000650d]
|
||||||
|
X-Runtime: ['0.111833']
|
||||||
|
X-XSS-Protection: [1; mode=block]
|
||||||
|
content-length: ['6006']
|
||||||
|
status: {code: 200, message: OK}
|
||||||
|
- request:
|
||||||
|
body: null
|
||||||
|
headers:
|
||||||
|
Accept: ['*/*']
|
||||||
|
Accept-Encoding: ['gzip, deflate']
|
||||||
|
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
|
||||||
|
Connection: [keep-alive]
|
||||||
|
Content-Length: ['0']
|
||||||
|
User-Agent: [python-requests/2.18.4]
|
||||||
|
method: DELETE
|
||||||
|
uri: http://localhost:3000/api/v1/statuses/99090169099991050
|
||||||
|
response:
|
||||||
|
body: {string: '{}'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"d2100116a1dcae5072eb614b86580a6a"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [031af8df-d374-4240-932b-69b9fd56a287]
|
||||||
|
X-Runtime: ['0.024463']
|
||||||
|
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_ACCESS_TOKEN]
|
||||||
|
Connection: [keep-alive]
|
||||||
|
Content-Length: ['0']
|
||||||
|
User-Agent: [python-requests/2.18.4]
|
||||||
|
method: DELETE
|
||||||
|
uri: http://localhost:3000/api/v1/statuses/99090169112505641
|
||||||
|
response:
|
||||||
|
body: {string: '{}'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"d2100116a1dcae5072eb614b86580a6a"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [1c37069e-0762-4ef9-af88-f3487284254c]
|
||||||
|
X-Runtime: ['0.029164']
|
||||||
|
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_ACCESS_TOKEN]
|
||||||
|
Connection: [keep-alive]
|
||||||
|
Content-Length: ['0']
|
||||||
|
User-Agent: [python-requests/2.18.4]
|
||||||
|
method: DELETE
|
||||||
|
uri: http://localhost:3000/api/v1/statuses/99090169128453211
|
||||||
|
response:
|
||||||
|
body: {string: '{}'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"d2100116a1dcae5072eb614b86580a6a"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [ee8e4da0-d995-4c51-9457-c9daeb590a62]
|
||||||
|
X-Runtime: ['0.028627']
|
||||||
|
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_ACCESS_TOKEN]
|
||||||
|
Connection: [keep-alive]
|
||||||
|
Content-Length: ['0']
|
||||||
|
User-Agent: [python-requests/2.18.4]
|
||||||
|
method: DELETE
|
||||||
|
uri: http://localhost:3000/api/v1/statuses/99090169144720352
|
||||||
|
response:
|
||||||
|
body: {string: '{}'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"d2100116a1dcae5072eb614b86580a6a"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [1e53f86d-0f9e-4748-93d5-c30a4781b2d7]
|
||||||
|
X-Runtime: ['0.034070']
|
||||||
|
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_ACCESS_TOKEN]
|
||||||
|
Connection: [keep-alive]
|
||||||
|
Content-Length: ['0']
|
||||||
|
User-Agent: [python-requests/2.18.4]
|
||||||
|
method: DELETE
|
||||||
|
uri: http://localhost:3000/api/v1/statuses/99090169157818918
|
||||||
|
response:
|
||||||
|
body: {string: '{}'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"d2100116a1dcae5072eb614b86580a6a"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [39c43ad0-289d-4104-b316-d916329fbe54]
|
||||||
|
X-Runtime: ['0.063475']
|
||||||
|
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_ACCESS_TOKEN]
|
||||||
|
Connection: [keep-alive]
|
||||||
|
Content-Length: ['0']
|
||||||
|
User-Agent: [python-requests/2.18.4]
|
||||||
|
method: DELETE
|
||||||
|
uri: http://localhost:3000/api/v1/statuses/99090169171463026
|
||||||
|
response:
|
||||||
|
body: {string: '{}'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"d2100116a1dcae5072eb614b86580a6a"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [99c0cba3-b0e0-4763-84af-2353c25ebe60]
|
||||||
|
X-Runtime: ['0.029262']
|
||||||
|
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_ACCESS_TOKEN]
|
||||||
|
Connection: [keep-alive]
|
||||||
|
Content-Length: ['0']
|
||||||
|
User-Agent: [python-requests/2.18.4]
|
||||||
|
method: DELETE
|
||||||
|
uri: http://localhost:3000/api/v1/statuses/99090169180477526
|
||||||
|
response:
|
||||||
|
body: {string: '{}'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"0eeb7866ab8d2132c1f780df22673726"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [71b494de-d425-4d8a-8e73-7201145e3d38]
|
||||||
|
X-Runtime: ['0.038512']
|
||||||
|
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_ACCESS_TOKEN]
|
||||||
|
Connection: [keep-alive]
|
||||||
|
Content-Length: ['0']
|
||||||
|
User-Agent: [python-requests/2.18.4]
|
||||||
|
method: DELETE
|
||||||
|
uri: http://localhost:3000/api/v1/statuses/99090169189662625
|
||||||
|
response:
|
||||||
|
body: {string: '{}'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"0eeb7866ab8d2132c1f780df22673726"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [534aba73-4c70-4b04-951e-9217a5b568fa]
|
||||||
|
X-Runtime: ['0.032901']
|
||||||
|
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_ACCESS_TOKEN]
|
||||||
|
Connection: [keep-alive]
|
||||||
|
Content-Length: ['0']
|
||||||
|
User-Agent: [python-requests/2.18.4]
|
||||||
|
method: DELETE
|
||||||
|
uri: http://localhost:3000/api/v1/statuses/99090169197421619
|
||||||
|
response:
|
||||||
|
body: {string: '{}'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"0eeb7866ab8d2132c1f780df22673726"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [22488d4b-0de8-4073-9228-705e93b01a34]
|
||||||
|
X-Runtime: ['0.035844']
|
||||||
|
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_ACCESS_TOKEN]
|
||||||
|
Connection: [keep-alive]
|
||||||
|
Content-Length: ['0']
|
||||||
|
User-Agent: [python-requests/2.18.4]
|
||||||
|
method: DELETE
|
||||||
|
uri: http://localhost:3000/api/v1/statuses/99090169205393273
|
||||||
|
response:
|
||||||
|
body: {string: '{}'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"0eeb7866ab8d2132c1f780df22673726"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [ad2e5900-bb6b-4d96-adab-481b3d023ffe]
|
||||||
|
X-Runtime: ['0.032735']
|
||||||
|
X-XSS-Protection: [1; mode=block]
|
||||||
|
content-length: ['2']
|
||||||
|
status: {code: 200, message: OK}
|
||||||
|
version: 1
|
80
tests/cassettes/test_follow_request_authorize.yaml
Normal file
80
tests/cassettes/test_follow_request_authorize.yaml
Normal file
|
@ -0,0 +1,80 @@
|
||||||
|
interactions:
|
||||||
|
- request:
|
||||||
|
body: null
|
||||||
|
headers:
|
||||||
|
Accept: ['*/*']
|
||||||
|
Accept-Encoding: ['gzip, deflate']
|
||||||
|
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN_2]
|
||||||
|
Connection: [keep-alive]
|
||||||
|
Content-Length: ['0']
|
||||||
|
User-Agent: [python-requests/2.18.4]
|
||||||
|
method: POST
|
||||||
|
uri: http://localhost:3000/api/v1/accounts/1234567890123456/follow
|
||||||
|
response:
|
||||||
|
body: {string: '{"id":"1234567890123456","following":false,"followed_by":false,"blocking":false,"muting":false,"requested":true,"domain_blocking":false}'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"39b04ee179b7c6820c81f24224090155"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [ff6e83a7-8f9e-4e71-91fe-ab3d12a7b379]
|
||||||
|
X-Runtime: ['0.073482']
|
||||||
|
X-XSS-Protection: [1; mode=block]
|
||||||
|
content-length: ['136']
|
||||||
|
status: {code: 200, message: OK}
|
||||||
|
- request:
|
||||||
|
body: null
|
||||||
|
headers:
|
||||||
|
Accept: ['*/*']
|
||||||
|
Accept-Encoding: ['gzip, deflate']
|
||||||
|
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
|
||||||
|
Connection: [keep-alive]
|
||||||
|
Content-Length: ['0']
|
||||||
|
User-Agent: [python-requests/2.18.4]
|
||||||
|
method: POST
|
||||||
|
uri: http://localhost:3000/api/v1/follow_requests/1/authorize
|
||||||
|
response:
|
||||||
|
body: {string: '{}'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"25cc8a12b4a7526df56e78049197b9fc"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [e7e70867-7816-42f7-bdfa-994f6bd2dbbc]
|
||||||
|
X-Runtime: ['0.040458']
|
||||||
|
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_ACCESS_TOKEN_2]
|
||||||
|
Connection: [keep-alive]
|
||||||
|
Content-Length: ['0']
|
||||||
|
User-Agent: [python-requests/2.18.4]
|
||||||
|
method: POST
|
||||||
|
uri: http://localhost:3000/api/v1/accounts/1234567890123456/unfollow
|
||||||
|
response:
|
||||||
|
body: {string: '{"id":"1234567890123456","following":false,"followed_by":false,"blocking":false,"muting":false,"requested":false,"domain_blocking":false}'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"fc9790ae7d4aa4b12007bc0900ea9c72"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [a651ddce-80d0-484b-a2f2-6c5fb6377d06]
|
||||||
|
X-Runtime: ['0.040597']
|
||||||
|
X-XSS-Protection: [1; mode=block]
|
||||||
|
content-length: ['137']
|
||||||
|
status: {code: 200, message: OK}
|
||||||
|
version: 1
|
54
tests/cassettes/test_follow_request_reject.yaml
Normal file
54
tests/cassettes/test_follow_request_reject.yaml
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
interactions:
|
||||||
|
- request:
|
||||||
|
body: null
|
||||||
|
headers:
|
||||||
|
Accept: ['*/*']
|
||||||
|
Accept-Encoding: ['gzip, deflate']
|
||||||
|
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN_2]
|
||||||
|
Connection: [keep-alive]
|
||||||
|
Content-Length: ['0']
|
||||||
|
User-Agent: [python-requests/2.18.4]
|
||||||
|
method: POST
|
||||||
|
uri: http://localhost:3000/api/v1/accounts/1234567890123456/follow
|
||||||
|
response:
|
||||||
|
body: {string: '{"id":"1234567890123456","following":false,"followed_by":false,"blocking":false,"muting":false,"requested":true,"domain_blocking":false}'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"5f0d561506d1323c3e160a377c23d7ea"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [7154cf2f-ace8-4c77-9dd8-f7de88d6dfbf]
|
||||||
|
X-Runtime: ['0.069936']
|
||||||
|
X-XSS-Protection: [1; mode=block]
|
||||||
|
content-length: ['136']
|
||||||
|
status: {code: 200, message: OK}
|
||||||
|
- request:
|
||||||
|
body: null
|
||||||
|
headers:
|
||||||
|
Accept: ['*/*']
|
||||||
|
Accept-Encoding: ['gzip, deflate']
|
||||||
|
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
|
||||||
|
Connection: [keep-alive]
|
||||||
|
Content-Length: ['0']
|
||||||
|
User-Agent: [python-requests/2.18.4]
|
||||||
|
method: POST
|
||||||
|
uri: http://localhost:3000/api/v1/follow_requests/1/reject
|
||||||
|
response:
|
||||||
|
body: {string: '{}'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"025d3164863931d5961fd059d0b0e4ee"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [941e921d-b13d-4ae9-b755-7bd5c9e7f911]
|
||||||
|
X-Runtime: ['0.032675']
|
||||||
|
X-XSS-Protection: [1; mode=block]
|
||||||
|
content-length: ['2']
|
||||||
|
status: {code: 200, message: OK}
|
||||||
|
version: 1
|
27
tests/cassettes/test_follow_requests.yaml
Normal file
27
tests/cassettes/test_follow_requests.yaml
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
interactions:
|
||||||
|
- request:
|
||||||
|
body: null
|
||||||
|
headers:
|
||||||
|
Accept: ['*/*']
|
||||||
|
Accept-Encoding: ['gzip, deflate']
|
||||||
|
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
|
||||||
|
Connection: [keep-alive]
|
||||||
|
User-Agent: [python-requests/2.18.4]
|
||||||
|
method: GET
|
||||||
|
uri: http://localhost:3000/api/v1/follow_requests
|
||||||
|
response:
|
||||||
|
body: {string: '[]'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"7f1d3431d40cc617f6f01b30e477e673"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [a8b8606f-2fe9-4f6d-a236-6db318021be1]
|
||||||
|
X-Runtime: ['0.028856']
|
||||||
|
X-XSS-Protection: [1; mode=block]
|
||||||
|
content-length: ['2']
|
||||||
|
status: {code: 200, message: OK}
|
||||||
|
version: 1
|
|
@ -1,27 +1,27 @@
|
||||||
interactions:
|
interactions:
|
||||||
- request:
|
- request:
|
||||||
body: redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&password=mastodonadmin&username=admin%40localhost%3A3000&grant_type=password&client_id=__MASTODON_PY_TEST_ID&client_secret=__MASTODON_PY_TEST_SECRET&scope=read+write+follow
|
body: !!python/unicode username=admin%40localhost%3A3000&password=mastodonadmin&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&client_id=__MASTODON_PY_TEST_CLIENT_ID&scope=read+write+follow&client_secret=__MASTODON_PY_TEST_CLIENT_SECRET&grant_type=password
|
||||||
headers:
|
headers:
|
||||||
Accept: ['*/*']
|
Accept: ['*/*']
|
||||||
Accept-Encoding: ['gzip, deflate']
|
Accept-Encoding: ['gzip, deflate']
|
||||||
Connection: [keep-alive]
|
Connection: [keep-alive]
|
||||||
Content-Length: ['221']
|
Content-Length: ['235']
|
||||||
Content-Type: [application/x-www-form-urlencoded]
|
Content-Type: [application/x-www-form-urlencoded]
|
||||||
User-Agent: [python-requests/2.18.4]
|
User-Agent: [python-requests/2.18.4]
|
||||||
method: POST
|
method: POST
|
||||||
uri: http://localhost:3000/oauth/token
|
uri: http://localhost:3000/oauth/token
|
||||||
response:
|
response:
|
||||||
body: {string: '{"access_token":"__MASTODON_PY_TEST_TOKEN","token_type":"bearer","scope":"read
|
body: {string: !!python/unicode '{"access_token":"__MASTODON_PY_TEST_ACCESS_TOKEN_2","token_type":"bearer","scope":"read
|
||||||
write follow","created_at":1511814180}'}
|
write follow","created_at":1511992220}'}
|
||||||
headers:
|
headers:
|
||||||
Cache-Control: [no-store]
|
cache-control: [no-store]
|
||||||
Content-Type: [application/json; charset=utf-8]
|
content-length: ['126']
|
||||||
ETag: [W/"f6a22ef91276cdcde8f09c8186d2d41d"]
|
content-type: [application/json; charset=utf-8]
|
||||||
Pragma: [no-cache]
|
etag: [W/"7f19440d01a73bd9685be7280866fa5b"]
|
||||||
Transfer-Encoding: [chunked]
|
pragma: [no-cache]
|
||||||
Vary: ['Accept-Encoding, Origin']
|
transfer-encoding: [chunked]
|
||||||
X-Request-Id: [85cb59f1-b92a-4ff8-8a49-c09bed55eb98]
|
vary: ['Accept-Encoding, Origin']
|
||||||
X-Runtime: ['0.077197']
|
x-request-id: [d33af1b6-ae04-495f-9a8c-720b570e98a9]
|
||||||
content-length: ['117']
|
x-runtime: ['0.244819']
|
||||||
status: {code: 200, message: OK}
|
status: {code: 200, message: OK}
|
||||||
version: 1
|
version: 1
|
||||||
|
|
|
@ -1,52 +1,54 @@
|
||||||
interactions:
|
interactions:
|
||||||
- request:
|
- request:
|
||||||
body: redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&password=mastodonadmin&username=admin%40localhost%3A3000&grant_type=password&client_id=__MASTODON_PY_TEST_ID&client_secret=__MASTODON_PY_TEST_SECRET&scope=read+write+follow
|
body: !!python/unicode username=admin%40localhost%3A3000&password=mastodonadmin&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&client_id=__MASTODON_PY_TEST_CLIENT_ID&scope=read+write+follow&client_secret=__MASTODON_PY_TEST_CLIENT_SECRET&grant_type=password
|
||||||
headers:
|
headers:
|
||||||
Accept: ['*/*']
|
Accept: ['*/*']
|
||||||
Accept-Encoding: ['gzip, deflate']
|
Accept-Encoding: ['gzip, deflate']
|
||||||
Connection: [keep-alive]
|
Connection: [keep-alive]
|
||||||
Content-Length: ['221']
|
Content-Length: ['235']
|
||||||
Content-Type: [application/x-www-form-urlencoded]
|
Content-Type: [application/x-www-form-urlencoded]
|
||||||
User-Agent: [python-requests/2.18.4]
|
User-Agent: [python-requests/2.18.4]
|
||||||
method: POST
|
method: POST
|
||||||
uri: http://localhost:3000/oauth/token
|
uri: http://localhost:3000/oauth/token
|
||||||
response:
|
response:
|
||||||
body: {string: '{"access_token":"__MASTODON_PY_TEST_TOKEN","token_type":"bearer","scope":"read
|
body: {string: !!python/unicode '{"access_token":"__MASTODON_PY_TEST_ACCESS_TOKEN_2","token_type":"bearer","scope":"read
|
||||||
write follow","created_at":1511814180}'}
|
write follow","created_at":1511992220}'}
|
||||||
headers:
|
headers:
|
||||||
Cache-Control: [no-store]
|
cache-control: [no-store]
|
||||||
Content-Type: [application/json; charset=utf-8]
|
content-length: ['126']
|
||||||
ETag: [W/"f77400f50590c94b55a861fb6d432464"]
|
content-type: [application/json; charset=utf-8]
|
||||||
Pragma: [no-cache]
|
etag: [W/"d69940161df215958096efeb1a959d12"]
|
||||||
Transfer-Encoding: [chunked]
|
pragma: [no-cache]
|
||||||
Vary: ['Accept-Encoding, Origin']
|
transfer-encoding: [chunked]
|
||||||
X-Request-Id: [b6168343-dd9e-4a0f-9ec4-69a1de8f879a]
|
vary: ['Accept-Encoding, Origin']
|
||||||
X-Runtime: ['0.080069']
|
x-request-id: [a05d2bef-1d32-4857-97b5-6cc4136dfd29]
|
||||||
content-length: ['117']
|
x-runtime: ['0.205660']
|
||||||
status: {code: 200, message: OK}
|
status: {code: 200, message: OK}
|
||||||
- request:
|
- request:
|
||||||
body: null
|
body: null
|
||||||
headers:
|
headers:
|
||||||
Accept: ['*/*']
|
Accept: ['*/*']
|
||||||
Accept-Encoding: ['gzip, deflate']
|
Accept-Encoding: ['gzip, deflate']
|
||||||
Authorization: [Bearer __MASTODON_PY_TEST_TOKEN]
|
Authorization: [!!python/unicode Bearer __MASTODON_PY_TEST_ACCESS_TOKEN_2]
|
||||||
Connection: [keep-alive]
|
Connection: [keep-alive]
|
||||||
User-Agent: [python-requests/2.18.4]
|
User-Agent: [python-requests/2.18.4]
|
||||||
method: GET
|
method: GET
|
||||||
uri: http://localhost:3000/api/v1/accounts/verify_credentials
|
uri: http://localhost:3000/api/v1/accounts/verify_credentials
|
||||||
response:
|
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":""}}'}
|
body: {string: !!python/unicode '{"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":50,"source":{"privacy":"public","sensitive":false,"note":"hello
|
||||||
|
:)"}}'}
|
||||||
headers:
|
headers:
|
||||||
Cache-Control: ['max-age=0, private, must-revalidate']
|
cache-control: ['max-age=0, private, must-revalidate']
|
||||||
Content-Type: [application/json; charset=utf-8]
|
content-length: ['669']
|
||||||
ETag: [W/"622f72a29f8398775e2abff7cd51dbac"]
|
content-type: [application/json; charset=utf-8]
|
||||||
Transfer-Encoding: [chunked]
|
etag: [W/"05183e2c68a77cfb9877fc356465a322"]
|
||||||
Vary: ['Accept-Encoding, Origin']
|
transfer-encoding: [chunked]
|
||||||
X-Content-Type-Options: [nosniff]
|
vary: ['Accept-Encoding, Origin']
|
||||||
X-Frame-Options: [SAMEORIGIN]
|
x-content-type-options: [nosniff]
|
||||||
X-Request-Id: [3852d894-50be-4342-a0e6-f9df2ddf5926]
|
x-frame-options: [SAMEORIGIN]
|
||||||
X-Runtime: ['0.029510']
|
x-request-id: [0cdc8a2f-6deb-4437-bd96-4e7178e1b9cd]
|
||||||
X-XSS-Protection: [1; mode=block]
|
x-runtime: ['0.230997']
|
||||||
content-length: ['650']
|
x-xss-protection: [1; mode=block]
|
||||||
status: {code: 200, message: OK}
|
status: {code: 200, message: OK}
|
||||||
version: 1
|
version: 1
|
||||||
|
|
27
tests/cassettes/test_mutes.yaml
Normal file
27
tests/cassettes/test_mutes.yaml
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
interactions:
|
||||||
|
- request:
|
||||||
|
body: null
|
||||||
|
headers:
|
||||||
|
Accept: ['*/*']
|
||||||
|
Accept-Encoding: ['gzip, deflate']
|
||||||
|
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
|
||||||
|
Connection: [keep-alive]
|
||||||
|
User-Agent: [python-requests/2.18.4]
|
||||||
|
method: GET
|
||||||
|
uri: http://localhost:3000/api/v1/mutes
|
||||||
|
response:
|
||||||
|
body: {string: '[]'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"ada2bcb0a9805d2061319aaa5a76ddc2"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [c06f07d7-b198-4628-a8df-e5d0e9333260]
|
||||||
|
X-Runtime: ['0.027466']
|
||||||
|
X-XSS-Protection: [1; mode=block]
|
||||||
|
content-length: ['2']
|
||||||
|
status: {code: 200, message: OK}
|
||||||
|
version: 1
|
130
tests/cassettes/test_notifications.yaml
Normal file
130
tests/cassettes/test_notifications.yaml
Normal file
|
@ -0,0 +1,130 @@
|
||||||
|
interactions:
|
||||||
|
- request:
|
||||||
|
body: visibility=&status=%40mastodonpy_test+hello%21
|
||||||
|
headers:
|
||||||
|
Accept: ['*/*']
|
||||||
|
Accept-Encoding: ['gzip, deflate']
|
||||||
|
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN_2]
|
||||||
|
Connection: [keep-alive]
|
||||||
|
Content-Length: ['46']
|
||||||
|
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":"99090794695574938","created_at":"2017-11-30T01:32:14.306Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"sr","uri":"http://localhost:3000/users/admin/statuses/99090794695574938","content":"\u003cp\u003e\u003cspan
|
||||||
|
class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\"
|
||||||
|
class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e
|
||||||
|
hello!\u003c/p\u003e","url":"http://localhost:3000/@admin/99090794695574938","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":53},"media_attachments":[],"mentions":[{"id":"1234567890123456","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[]}'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"7201d05fcb4b437059d9ce1e2174af25"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [58594a6a-aa68-4f68-86f0-f15a2f22cf73]
|
||||||
|
X-Runtime: ['0.135719']
|
||||||
|
X-XSS-Protection: [1; mode=block]
|
||||||
|
content-length: ['1542']
|
||||||
|
status: {code: 200, message: OK}
|
||||||
|
- request:
|
||||||
|
body: null
|
||||||
|
headers:
|
||||||
|
Accept: ['*/*']
|
||||||
|
Accept-Encoding: ['gzip, deflate']
|
||||||
|
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
|
||||||
|
Connection: [keep-alive]
|
||||||
|
User-Agent: [python-requests/2.18.4]
|
||||||
|
method: GET
|
||||||
|
uri: http://localhost:3000/api/v1/notifications
|
||||||
|
response:
|
||||||
|
body: {string: '[{"id":"16","type":"mention","created_at":"2017-11-30T01:32:14.351Z","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":53},"status":{"id":"99090794695574938","created_at":"2017-11-30T01:32:14.306Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"sr","uri":"http://localhost:3000/users/admin/statuses/99090794695574938","content":"\u003cp\u003e\u003cspan
|
||||||
|
class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\"
|
||||||
|
class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e
|
||||||
|
hello!\u003c/p\u003e","url":"http://localhost:3000/@admin/99090794695574938","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":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":53},"media_attachments":[],"mentions":[{"id":"1234567890123456","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[]}},{"id":"15","type":"mention","created_at":"2017-11-30T01:31:26.680Z","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":53},"status":{"id":"99090791570808347","created_at":"2017-11-30T01:31:26.630Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"sr","uri":"http://localhost:3000/users/admin/statuses/99090791570808347","content":"\u003cp\u003e\u003cspan
|
||||||
|
class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\"
|
||||||
|
class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e
|
||||||
|
hello!\u003c/p\u003e","url":"http://localhost:3000/@admin/99090791570808347","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":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":53},"media_attachments":[],"mentions":[{"id":"1234567890123456","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[]}}]'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"fa29e5b94ab138276eb80b2cd108df18"]
|
||||||
|
Link: ['<http://localhost:3000/api/v1/notifications?max_id=15>; rel="next",
|
||||||
|
<http://localhost:3000/api/v1/notifications?since_id=16>; rel="prev"']
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [431119a5-b511-4f69-a07c-8b05a2ff8390]
|
||||||
|
X-Runtime: ['0.102001']
|
||||||
|
X-XSS-Protection: [1; mode=block]
|
||||||
|
content-length: ['4441']
|
||||||
|
status: {code: 200, message: OK}
|
||||||
|
- request:
|
||||||
|
body: null
|
||||||
|
headers:
|
||||||
|
Accept: ['*/*']
|
||||||
|
Accept-Encoding: ['gzip, deflate']
|
||||||
|
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
|
||||||
|
Connection: [keep-alive]
|
||||||
|
User-Agent: [python-requests/2.18.4]
|
||||||
|
method: GET
|
||||||
|
uri: http://localhost:3000/api/v1/notifications/16
|
||||||
|
response:
|
||||||
|
body: {string: '{"id":"16","type":"mention","created_at":"2017-11-30T01:32:14.351Z","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":53},"status":{"id":"99090794695574938","created_at":"2017-11-30T01:32:14.306Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"sr","uri":"http://localhost:3000/users/admin/statuses/99090794695574938","content":"\u003cp\u003e\u003cspan
|
||||||
|
class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\"
|
||||||
|
class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e
|
||||||
|
hello!\u003c/p\u003e","url":"http://localhost:3000/@admin/99090794695574938","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":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":53},"media_attachments":[],"mentions":[{"id":"1234567890123456","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[]}}'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"80fb7e9873a9fd89cb5d3be0d5ffd248"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [68eef56e-6d1b-4a71-8435-014d37d5a5e0]
|
||||||
|
X-Runtime: ['0.045248']
|
||||||
|
X-XSS-Protection: [1; mode=block]
|
||||||
|
content-length: ['2219']
|
||||||
|
status: {code: 200, message: OK}
|
||||||
|
- request:
|
||||||
|
body: null
|
||||||
|
headers:
|
||||||
|
Accept: ['*/*']
|
||||||
|
Accept-Encoding: ['gzip, deflate']
|
||||||
|
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN_2]
|
||||||
|
Connection: [keep-alive]
|
||||||
|
Content-Length: ['0']
|
||||||
|
User-Agent: [python-requests/2.18.4]
|
||||||
|
method: DELETE
|
||||||
|
uri: http://localhost:3000/api/v1/statuses/99090794695574938
|
||||||
|
response:
|
||||||
|
body: {string: '{}'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"91480b3dc645d962fb3e347248bb79d0"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [96a5b3a1-51b4-498b-bf0e-6b15a78847e6]
|
||||||
|
X-Runtime: ['0.015668']
|
||||||
|
X-XSS-Protection: [1; mode=block]
|
||||||
|
content-length: ['2']
|
||||||
|
status: {code: 200, message: OK}
|
||||||
|
version: 1
|
28
tests/cassettes/test_notifications_clear.yaml
Normal file
28
tests/cassettes/test_notifications_clear.yaml
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
interactions:
|
||||||
|
- request:
|
||||||
|
body: null
|
||||||
|
headers:
|
||||||
|
Accept: ['*/*']
|
||||||
|
Accept-Encoding: ['gzip, deflate']
|
||||||
|
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
|
||||||
|
Connection: [keep-alive]
|
||||||
|
Content-Length: ['0']
|
||||||
|
User-Agent: [python-requests/2.18.4]
|
||||||
|
method: POST
|
||||||
|
uri: http://localhost:3000/api/v1/notifications/clear
|
||||||
|
response:
|
||||||
|
body: {string: '{}'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"35ef2e1d7c4d5273d1cb56508dccd187"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [08457d1a-6c84-4813-9949-0acfccd0251e]
|
||||||
|
X-Runtime: ['0.022075']
|
||||||
|
X-XSS-Protection: [1; mode=block]
|
||||||
|
content-length: ['2']
|
||||||
|
status: {code: 200, message: OK}
|
||||||
|
version: 1
|
126
tests/cassettes/test_notifications_dismiss.yaml
Normal file
126
tests/cassettes/test_notifications_dismiss.yaml
Normal file
|
@ -0,0 +1,126 @@
|
||||||
|
interactions:
|
||||||
|
- request:
|
||||||
|
body: visibility=&status=%40mastodonpy_test+hello%21
|
||||||
|
headers:
|
||||||
|
Accept: ['*/*']
|
||||||
|
Accept-Encoding: ['gzip, deflate']
|
||||||
|
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN_2]
|
||||||
|
Connection: [keep-alive]
|
||||||
|
Content-Length: ['46']
|
||||||
|
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":"99090810070829091","created_at":"2017-11-30T01:36:08.913Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"sr","uri":"http://localhost:3000/users/admin/statuses/99090810070829091","content":"\u003cp\u003e\u003cspan
|
||||||
|
class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\"
|
||||||
|
class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e
|
||||||
|
hello!\u003c/p\u003e","url":"http://localhost:3000/@admin/99090810070829091","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":52},"media_attachments":[],"mentions":[{"id":"1234567890123456","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[]}'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"1a3ec3316c2518ab5afcc7202dd1497e"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [a31a0e74-98bd-43b3-9592-2d62286b2ccb]
|
||||||
|
X-Runtime: ['0.119704']
|
||||||
|
X-XSS-Protection: [1; mode=block]
|
||||||
|
content-length: ['1542']
|
||||||
|
status: {code: 200, message: OK}
|
||||||
|
- request:
|
||||||
|
body: null
|
||||||
|
headers:
|
||||||
|
Accept: ['*/*']
|
||||||
|
Accept-Encoding: ['gzip, deflate']
|
||||||
|
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
|
||||||
|
Connection: [keep-alive]
|
||||||
|
User-Agent: [python-requests/2.18.4]
|
||||||
|
method: GET
|
||||||
|
uri: http://localhost:3000/api/v1/notifications
|
||||||
|
response:
|
||||||
|
body: {string: '[{"id":"17","type":"mention","created_at":"2017-11-30T01:36:08.959Z","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":52},"status":{"id":"99090810070829091","created_at":"2017-11-30T01:36:08.913Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"sr","uri":"http://localhost:3000/users/admin/statuses/99090810070829091","content":"\u003cp\u003e\u003cspan
|
||||||
|
class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\"
|
||||||
|
class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e
|
||||||
|
hello!\u003c/p\u003e","url":"http://localhost:3000/@admin/99090810070829091","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":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":52},"media_attachments":[],"mentions":[{"id":"1234567890123456","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[]}},{"id":"15","type":"mention","created_at":"2017-11-30T01:31:26.680Z","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":52},"status":{"id":"99090791570808347","created_at":"2017-11-30T01:31:26.630Z","in_reply_to_id":null,"in_reply_to_account_id":null,"sensitive":false,"spoiler_text":"","visibility":"public","language":"sr","uri":"http://localhost:3000/users/admin/statuses/99090791570808347","content":"\u003cp\u003e\u003cspan
|
||||||
|
class=\"h-card\"\u003e\u003ca href=\"http://localhost:3000/@mastodonpy_test\"
|
||||||
|
class=\"u-url mention\"\u003e@\u003cspan\u003emastodonpy_test\u003c/span\u003e\u003c/a\u003e\u003c/span\u003e
|
||||||
|
hello!\u003c/p\u003e","url":"http://localhost:3000/@admin/99090791570808347","reblogs_count":0,"favourites_count":0,"favourited":false,"reblogged":false,"muted":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":52},"media_attachments":[],"mentions":[{"id":"1234567890123456","username":"mastodonpy_test","url":"http://localhost:3000/@mastodonpy_test","acct":"mastodonpy_test"}],"tags":[],"emojis":[]}}]'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"064e96244d5856cc227a2fa7d846513e"]
|
||||||
|
Link: ['<http://localhost:3000/api/v1/notifications?max_id=15>; rel="next",
|
||||||
|
<http://localhost:3000/api/v1/notifications?since_id=17>; rel="prev"']
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [2347ae7b-0002-4aab-baba-e62a7eb3b716]
|
||||||
|
X-Runtime: ['0.136302']
|
||||||
|
X-XSS-Protection: [1; mode=block]
|
||||||
|
content-length: ['4441']
|
||||||
|
status: {code: 200, message: OK}
|
||||||
|
- request:
|
||||||
|
body: id=17
|
||||||
|
headers:
|
||||||
|
Accept: ['*/*']
|
||||||
|
Accept-Encoding: ['gzip, deflate']
|
||||||
|
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
|
||||||
|
Connection: [keep-alive]
|
||||||
|
Content-Length: ['5']
|
||||||
|
Content-Type: [application/x-www-form-urlencoded]
|
||||||
|
User-Agent: [python-requests/2.18.4]
|
||||||
|
method: POST
|
||||||
|
uri: http://localhost:3000/api/v1/notifications/dismiss
|
||||||
|
response:
|
||||||
|
body: {string: '{}'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"35ef2e1d7c4d5273d1cb56508dccd187"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [24688740-1fd8-4cb3-9def-075a707c5d6c]
|
||||||
|
X-Runtime: ['0.024190']
|
||||||
|
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_ACCESS_TOKEN_2]
|
||||||
|
Connection: [keep-alive]
|
||||||
|
Content-Length: ['0']
|
||||||
|
User-Agent: [python-requests/2.18.4]
|
||||||
|
method: DELETE
|
||||||
|
uri: http://localhost:3000/api/v1/statuses/99090810070829091
|
||||||
|
response:
|
||||||
|
body: {string: '{}'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"35ef2e1d7c4d5273d1cb56508dccd187"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [8ae15858-4ac7-49cd-ad68-47567b42a93f]
|
||||||
|
X-Runtime: ['0.029080']
|
||||||
|
X-XSS-Protection: [1; mode=block]
|
||||||
|
content-length: ['2']
|
||||||
|
status: {code: 200, message: OK}
|
||||||
|
version: 1
|
27
tests/cassettes/test_search.yaml
Normal file
27
tests/cassettes/test_search.yaml
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
interactions:
|
||||||
|
- request:
|
||||||
|
body: null
|
||||||
|
headers:
|
||||||
|
Accept: ['*/*']
|
||||||
|
Accept-Encoding: ['gzip, deflate']
|
||||||
|
Authorization: [Bearer __MASTODON_PY_TEST_ACCESS_TOKEN]
|
||||||
|
Connection: [keep-alive]
|
||||||
|
User-Agent: [python-requests/2.18.4]
|
||||||
|
method: GET
|
||||||
|
uri: http://localhost:3000/api/v1/search?resolve=False&q=mastodonpy_test
|
||||||
|
response:
|
||||||
|
body: {string: '{"hashtags":[],"accounts":[{"id":"1234567890123456","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":true,"created_at":"2017-11-30T02:04:02.381Z","note":"\u003cp\u003e\u003c/p\u003e","url":"http://localhost:3000/@mastodonpy_test","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":0}],"statuses":[]}'}
|
||||||
|
headers:
|
||||||
|
Cache-Control: ['max-age=0, private, must-revalidate']
|
||||||
|
Content-Type: [application/json; charset=utf-8]
|
||||||
|
ETag: [W/"ca9aba75f5a1bb7abfc7ef167bd9a5a4"]
|
||||||
|
Transfer-Encoding: [chunked]
|
||||||
|
Vary: ['Accept-Encoding, Origin']
|
||||||
|
X-Content-Type-Options: [nosniff]
|
||||||
|
X-Frame-Options: [SAMEORIGIN]
|
||||||
|
X-Request-Id: [1bde23af-0df6-4e29-bc1c-d9bb161702b3]
|
||||||
|
X-Runtime: ['0.024721']
|
||||||
|
X-XSS-Protection: [1; mode=block]
|
||||||
|
content-length: ['599']
|
||||||
|
status: {code: 200, message: OK}
|
||||||
|
version: 1
|
|
@ -1,21 +1,28 @@
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
|
||||||
|
def _api(access_token='__MASTODON_PY_TEST_ACCESS_TOKEN'):
|
||||||
|
import mastodon
|
||||||
|
return mastodon.Mastodon(
|
||||||
|
api_base_url='http://localhost:3000',
|
||||||
|
client_id='__MASTODON_PY_TEST_CLIENT_ID',
|
||||||
|
client_secret='__MASTODON_PY_TEST_CLIENT_SECRET',
|
||||||
|
access_token=access_token)
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def api():
|
def api():
|
||||||
import mastodon
|
return _api()
|
||||||
return mastodon.Mastodon(
|
|
||||||
api_base_url='http://localhost:3000',
|
|
||||||
client_id='__MASTODON_PY_TEST_ID',
|
@pytest.fixture
|
||||||
client_secret='__MASTODON_PY_TEST_SECRET',
|
def api2():
|
||||||
access_token='__MASTODON_PY_TEST_TOKEN')
|
return _api(access_token='__MASTODON_PY_TEST_ACCESS_TOKEN_2')
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def api_anonymous():
|
def api_anonymous():
|
||||||
import mastodon
|
return _api(access_token=None)
|
||||||
return mastodon.Mastodon(
|
|
||||||
api_base_url='http://localhost:3000',
|
|
||||||
client_id='__MASTODON_PY_TEST_ID',
|
|
||||||
client_secret='__MASTODON_PY_TEST_SECRET')
|
|
||||||
|
|
||||||
@pytest.fixture()
|
@pytest.fixture()
|
||||||
def status(api):
|
def status(api):
|
||||||
|
|
105
tests/setup.sql
Normal file
105
tests/setup.sql
Normal file
|
@ -0,0 +1,105 @@
|
||||||
|
DELETE FROM settings WHERE id = 1234567890123456;
|
||||||
|
DELETE FROM oauth_access_tokens WHERE id = 6543210987654321;
|
||||||
|
DELETE FROM oauth_access_tokens WHERE id = 1234567890123456;
|
||||||
|
DELETE FROM oauth_applications WHERE id = 1234567890123456;
|
||||||
|
DELETE FROM users WHERE id = 1234567890123456;
|
||||||
|
DELETE FROM accounts WHERE id = 1234567890123456;
|
||||||
|
|
||||||
|
INSERT INTO accounts (
|
||||||
|
id,
|
||||||
|
username,
|
||||||
|
locked,
|
||||||
|
created_at,
|
||||||
|
updated_at
|
||||||
|
) VALUES (
|
||||||
|
1234567890123456,
|
||||||
|
'mastodonpy_test',
|
||||||
|
't',
|
||||||
|
now(),
|
||||||
|
now()
|
||||||
|
);
|
||||||
|
|
||||||
|
INSERT INTO users (
|
||||||
|
id,
|
||||||
|
email,
|
||||||
|
account_id,
|
||||||
|
created_at,
|
||||||
|
updated_at,
|
||||||
|
confirmed_at,
|
||||||
|
locale
|
||||||
|
) VALUES (
|
||||||
|
1234567890123456,
|
||||||
|
'mastodonpy_test@localhost:3000',
|
||||||
|
1234567890123456,
|
||||||
|
now(),
|
||||||
|
now(),
|
||||||
|
now(),
|
||||||
|
'ja' -- japanese locale for unicode testing :p
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
INSERT INTO oauth_applications (
|
||||||
|
id,
|
||||||
|
name,
|
||||||
|
uid,
|
||||||
|
secret,
|
||||||
|
redirect_uri,
|
||||||
|
scopes,
|
||||||
|
owner_type,
|
||||||
|
owner_id,
|
||||||
|
created_at,
|
||||||
|
updated_at
|
||||||
|
) VALUES (
|
||||||
|
1234567890123456,
|
||||||
|
'Mastodon.py test suite',
|
||||||
|
'__MASTODON_PY_TEST_CLIENT_ID',
|
||||||
|
'__MASTODON_PY_TEST_CLIENT_SECRET',
|
||||||
|
'urn:ietf:wg:oauth:2.0:oob',
|
||||||
|
'read write follow',
|
||||||
|
'User',
|
||||||
|
1234567890123456,
|
||||||
|
now(),
|
||||||
|
now()
|
||||||
|
);
|
||||||
|
|
||||||
|
INSERT INTO oauth_access_tokens (
|
||||||
|
id,
|
||||||
|
token,
|
||||||
|
scopes,
|
||||||
|
application_id,
|
||||||
|
resource_owner_id,
|
||||||
|
created_at
|
||||||
|
) VALUES (
|
||||||
|
1234567890123456,
|
||||||
|
'__MASTODON_PY_TEST_ACCESS_TOKEN',
|
||||||
|
'read write follow',
|
||||||
|
1234567890123456,
|
||||||
|
1234567890123456,
|
||||||
|
now()
|
||||||
|
), (
|
||||||
|
6543210987654321,
|
||||||
|
'__MASTODON_PY_TEST_ACCESS_TOKEN_2',
|
||||||
|
'read write follow',
|
||||||
|
1234567890123456,
|
||||||
|
1,
|
||||||
|
now()
|
||||||
|
);
|
||||||
|
|
||||||
|
INSERT INTO settings (
|
||||||
|
id,
|
||||||
|
var,
|
||||||
|
value,
|
||||||
|
thing_type,
|
||||||
|
thing_id,
|
||||||
|
created_at,
|
||||||
|
updated_at
|
||||||
|
) VALUES (
|
||||||
|
1234567890123456,
|
||||||
|
'notification_emails',
|
||||||
|
E'---\nfollow_request: false',
|
||||||
|
'User',
|
||||||
|
1234567890123456,
|
||||||
|
now(),
|
||||||
|
now()
|
||||||
|
)
|
|
@ -1,37 +0,0 @@
|
||||||
WITH new_app AS (
|
|
||||||
INSERT INTO oauth_applications (
|
|
||||||
name,
|
|
||||||
uid,
|
|
||||||
secret,
|
|
||||||
redirect_uri,
|
|
||||||
scopes,
|
|
||||||
owner_type,
|
|
||||||
owner_id,
|
|
||||||
created_at,
|
|
||||||
updated_at
|
|
||||||
) VALUES (
|
|
||||||
'Mastodon.py test suite',
|
|
||||||
'__MASTODON_PY_TEST_ID',
|
|
||||||
'__MASTODON_PY_TEST_SECRET',
|
|
||||||
'urn:ietf:wg:oauth:2.0:oob',
|
|
||||||
'read write follow',
|
|
||||||
'User',
|
|
||||||
1,
|
|
||||||
now(),
|
|
||||||
now()
|
|
||||||
)
|
|
||||||
RETURNING id
|
|
||||||
)
|
|
||||||
INSERT INTO oauth_access_tokens (
|
|
||||||
token,
|
|
||||||
scopes,
|
|
||||||
application_id,
|
|
||||||
resource_owner_id,
|
|
||||||
created_at
|
|
||||||
) SELECT
|
|
||||||
'__MASTODON_PY_TEST_TOKEN',
|
|
||||||
'read write follow',
|
|
||||||
new_app.id,
|
|
||||||
1,
|
|
||||||
now()
|
|
||||||
FROM new_app;
|
|
96
tests/test_account.py
Normal file
96
tests/test_account.py
Normal file
|
@ -0,0 +1,96 @@
|
||||||
|
import pytest
|
||||||
|
from mastodon.Mastodon import MastodonAPIError
|
||||||
|
|
||||||
|
@pytest.mark.vcr()
|
||||||
|
def test_account(api):
|
||||||
|
account = api.account(1)
|
||||||
|
assert account
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.vcr()
|
||||||
|
def test_account_following(api):
|
||||||
|
following = api.account_following(1)
|
||||||
|
assert isinstance(following, list)
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.vcr()
|
||||||
|
def test_account_followers(api):
|
||||||
|
followers = api.account_followers(1)
|
||||||
|
assert isinstance(followers, list)
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.vcr()
|
||||||
|
def test_account_relationships(api):
|
||||||
|
relationships = api.account_relationships(1)
|
||||||
|
assert isinstance(relationships, list)
|
||||||
|
assert len(relationships) == 1
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.vcr()
|
||||||
|
def test_account_search(api):
|
||||||
|
results = api.account_search('admin')
|
||||||
|
assert isinstance(results, list)
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.vcr()
|
||||||
|
def test_account_follow_unfollow(api):
|
||||||
|
relationship = api.account_follow(1)
|
||||||
|
try:
|
||||||
|
assert relationship
|
||||||
|
assert relationship['following']
|
||||||
|
finally:
|
||||||
|
relationship = api.account_unfollow(1)
|
||||||
|
assert relationship
|
||||||
|
assert not relationship['following']
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.vcr()
|
||||||
|
def test_account_block_unblock(api):
|
||||||
|
relationship = api.account_block(1)
|
||||||
|
try:
|
||||||
|
assert relationship
|
||||||
|
assert relationship['blocking']
|
||||||
|
finally:
|
||||||
|
relationship = api.account_unblock(1)
|
||||||
|
assert relationship
|
||||||
|
assert not relationship['blocking']
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.vcr()
|
||||||
|
def test_account_mute_unmute(api):
|
||||||
|
relationship = api.account_mute(1)
|
||||||
|
try:
|
||||||
|
assert relationship
|
||||||
|
assert relationship['muting']
|
||||||
|
finally:
|
||||||
|
relationship = api.account_unmute(1)
|
||||||
|
assert relationship
|
||||||
|
assert not relationship['muting']
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.vcr()
|
||||||
|
def test_mutes(api):
|
||||||
|
mutes = api.mutes()
|
||||||
|
assert isinstance(mutes, list)
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.vcr()
|
||||||
|
def test_blocks(api):
|
||||||
|
blocks = api.blocks()
|
||||||
|
assert isinstance(blocks, list)
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.vcr()
|
||||||
|
def test_account_update_credentials(api):
|
||||||
|
import base64
|
||||||
|
with open('tests/image.jpg', 'rb') as f:
|
||||||
|
image = f.read()
|
||||||
|
b64_image = base64.b64encode(image)
|
||||||
|
data_uri = b'data:image/jpeg;base64,' + b64_image
|
||||||
|
|
||||||
|
account = api.account_update_credentials(
|
||||||
|
display_name='John Lennon',
|
||||||
|
note='I walk funny',
|
||||||
|
avatar = data_uri,
|
||||||
|
header = data_uri)
|
||||||
|
assert account
|
13
tests/test_domain_blocks.py
Normal file
13
tests/test_domain_blocks.py
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
import pytest
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.vcr()
|
||||||
|
def test_domain_blocks(api):
|
||||||
|
blocks = api.domain_blocks()
|
||||||
|
assert isinstance(blocks, list)
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.vcr()
|
||||||
|
def test_domain_block_unblock(api):
|
||||||
|
api.domain_block('example.com')
|
||||||
|
api.domain_unblock('example.com')
|
21
tests/test_follow_requests.py
Normal file
21
tests/test_follow_requests.py
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
import pytest
|
||||||
|
|
||||||
|
@pytest.mark.vcr()
|
||||||
|
def test_follow_requests(api):
|
||||||
|
reqs = api.follow_requests()
|
||||||
|
assert isinstance(reqs, list)
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.vcr()
|
||||||
|
def test_follow_request_authorize(api, api2):
|
||||||
|
api2.account_follow(1234567890123456)
|
||||||
|
api.follow_request_authorize(1)
|
||||||
|
api2.account_unfollow(1234567890123456)
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.vcr()
|
||||||
|
def test_follow_request_reject(api, api2):
|
||||||
|
api2.account_follow(1234567890123456)
|
||||||
|
api.follow_request_reject(1)
|
||||||
|
|
||||||
|
|
21
tests/test_notifications.py
Normal file
21
tests/test_notifications.py
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
import pytest
|
||||||
|
|
||||||
|
@pytest.fixture()
|
||||||
|
def mention(api2):
|
||||||
|
status = api2.status_post('@mastodonpy_test hello!')
|
||||||
|
yield status
|
||||||
|
api2.status_delete(status)
|
||||||
|
|
||||||
|
@pytest.mark.vcr()
|
||||||
|
def test_notifications(api, mention):
|
||||||
|
notifications = api.notifications()
|
||||||
|
api.notifications(notifications[0])
|
||||||
|
|
||||||
|
@pytest.mark.vcr()
|
||||||
|
def test_notifications_dismiss(api, mention):
|
||||||
|
notifications = api.notifications()
|
||||||
|
api.notifications_dismiss(notifications[0])
|
||||||
|
|
||||||
|
@pytest.mark.vcr()
|
||||||
|
def test_notifications_clear(api):
|
||||||
|
api.notifications_clear()
|
|
@ -1,6 +1,8 @@
|
||||||
import pytest
|
import pytest
|
||||||
from contextlib import contextmanager
|
from contextlib import contextmanager
|
||||||
|
|
||||||
|
UNLIKELY_HASHTAG = "fgiztsshwiaqqiztpmmjbtvmescsculuvmgjgopwoeidbcrixp"
|
||||||
|
|
||||||
|
|
||||||
@contextmanager
|
@contextmanager
|
||||||
def many_statuses(api, n=10, suffix=''):
|
def many_statuses(api, n=10, suffix=''):
|
||||||
|
@ -24,9 +26,19 @@ def test_fetch_next_previous(api):
|
||||||
assert previous_statuses
|
assert previous_statuses
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.vcr()
|
||||||
|
def test_fetch_next_previous_from_pagination_info(api):
|
||||||
|
account = api.account_verify_credentials()
|
||||||
|
with many_statuses(api):
|
||||||
|
statuses = api.account_statuses(account['id'], limit=5)
|
||||||
|
next_statuses = api.fetch_next(statuses[-1]['_pagination_next'])
|
||||||
|
assert next_statuses
|
||||||
|
previous_statuses = api.fetch_previous(next_statuses[0]['_pagination_prev'])
|
||||||
|
assert previous_statuses
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.vcr()
|
@pytest.mark.vcr()
|
||||||
def test_fetch_remaining(api):
|
def test_fetch_remaining(api):
|
||||||
UNLIKELY_HASHTAG = "fgiztsshwiaqqiztpmmjbtvmescsculuvmgjgopwoeidbcrixp"
|
|
||||||
with many_statuses(api, n=30, suffix=' #'+UNLIKELY_HASHTAG):
|
with many_statuses(api, n=30, suffix=' #'+UNLIKELY_HASHTAG):
|
||||||
hashtag = api.timeline_hashtag(UNLIKELY_HASHTAG, limit=10)
|
hashtag = api.timeline_hashtag(UNLIKELY_HASHTAG, limit=10)
|
||||||
hashtag_remaining = api.fetch_remaining(hashtag)
|
hashtag_remaining = api.fetch_remaining(hashtag)
|
||||||
|
|
6
tests/test_search.py
Normal file
6
tests/test_search.py
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
import pytest
|
||||||
|
|
||||||
|
@pytest.mark.vcr()
|
||||||
|
def test_search(api):
|
||||||
|
results = api.search('mastodonpy_test')
|
||||||
|
assert isinstance(results, dict)
|
|
@ -86,6 +86,11 @@ def test_status_fav_unfav(status, api):
|
||||||
status = api.status_unfavourite(status['id'])
|
status = api.status_unfavourite(status['id'])
|
||||||
assert not status['favourited']
|
assert not status['favourited']
|
||||||
|
|
||||||
|
@pytest.mark.vcr()
|
||||||
|
def test_favourites(api):
|
||||||
|
favs = api.favourites()
|
||||||
|
assert isinstance(favs, list)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.vcr()
|
@pytest.mark.vcr()
|
||||||
def test_status_mute_unmute(status, api):
|
def test_status_mute_unmute(status, api):
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import pytest
|
import pytest
|
||||||
|
from mastodon.Mastodon import MastodonAPIError, MastodonIllegalArgumentError
|
||||||
|
|
||||||
@pytest.mark.vcr()
|
@pytest.mark.vcr()
|
||||||
def test_public_tl_anonymous(api_anonymous, status):
|
def test_public_tl_anonymous(api_anonymous, status):
|
||||||
|
@ -30,8 +31,12 @@ def test_hashtag_tl(api):
|
||||||
finally:
|
finally:
|
||||||
api.status_delete(status['id'])
|
api.status_delete(status['id'])
|
||||||
|
|
||||||
|
def test_hashtag_tl_leading_hash(api):
|
||||||
|
with pytest.raises(MastodonIllegalArgumentError):
|
||||||
|
api.timeline_hashtag('#hoot')
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.vcr()
|
@pytest.mark.vcr()
|
||||||
def test_home_tl_anonymous_throws(api_anonymous):
|
def test_home_tl_anonymous_throws(api_anonymous):
|
||||||
from mastodon.Mastodon import MastodonAPIError
|
|
||||||
with pytest.raises(MastodonAPIError):
|
with pytest.raises(MastodonAPIError):
|
||||||
tl = api_anonymous.timeline_home()
|
api_anonymous.timeline_home()
|
||||||
|
|
Loading…
Referencia en una nova incidència