Skip to content

Commit

Permalink
commit new tests, bump versions
Browse files Browse the repository at this point in the history
  • Loading branch information
halcy authored and halcy committed Nov 19, 2022
1 parent bc2cb5e commit 98760f6
Show file tree
Hide file tree
Showing 127 changed files with 72,950 additions and 73,598 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ v1.6.3
* Add account lookup API (`account_lookup`)
* Add `policy` param to control notification sources for `push_subscription_set`
* Add ability to get detailed signup error to `create_account`
* Fix version check for limited federation instances (Thanks to ulysseus-eu for the report)

v1.6.2
------
* Fix some issues with datetime conversion
* Fix some issues with datetime conversion (thanks to various people for reporting it)

v1.6.1
------
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Mastodon.py
===========
Python wrapper for the Mastodon ( https://github.com/mastodon/mastodon/ ) API.
Feature complete for public API as of Mastodon version 3.3.0 and easy to get started with:
Feature complete for public API as of Mastodon version 3.4.0 and easy to get started with:

.. code-block:: python
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
# The short X.Y version.
version = u'1.6'
# The full version, including alpha/beta/rc tags.
release = u'1.6.2'
release = u'1.6.3'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
}

setup(name='Mastodon.py',
version='1.6.2',
version='1.6.3',
description='Python wrapper for the Mastodon API',
packages=['mastodon'],
install_requires=[
Expand Down
22 changes: 11 additions & 11 deletions tests/cassettes/test_account.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ interactions:
uri: http://localhost:3000/api/v1/accounts/verify_credentials
response:
body:
string: '{"id":"109337440686176140","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":true,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-13T00:00:00.000Z","note":"","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,"last_status_at":null,"noindex":false,"source":{"privacy":"public","sensitive":false,"language":null,"note":"","fields":[],"follow_requests_count":0},"emojis":[],"fields":[],"role":{"id":"-99","name":"","permissions":"65536","color":"","highlighted":false}}'
string: '{"id":"109367691239664003","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":true,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-19T00:00:00.000Z","note":"","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,"last_status_at":null,"noindex":false,"source":{"privacy":"public","sensitive":false,"language":null,"note":"","fields":[],"follow_requests_count":0},"emojis":[],"fields":[],"role":{"id":"-99","name":"","permissions":"65536","color":"","highlighted":false}}'
headers:
Cache-Control:
- no-store
Content-Security-Policy:
- 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src
''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000;
style-src ''self'' http://localhost:3000 ''nonce-4hrGOz1qINS4fCtu3iC58g=='';
style-src ''self'' http://localhost:3000 ''nonce-8k2h1qeXTVSWZQ39kEDEBA=='';
media-src ''self'' https: data: http://localhost:3000; frame-src ''self''
https:; manifest-src ''self'' http://localhost:3000; connect-src ''self''
data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000
Expand All @@ -33,7 +33,7 @@ interactions:
Content-Type:
- application/json; charset=utf-8
ETag:
- W/"d2cab5b3aa517843f533e7d948c90087"
- W/"92674a04a830c7267ce720489b1c0ac2"
Referrer-Policy:
- strict-origin-when-cross-origin
Transfer-Encoding:
Expand All @@ -49,9 +49,9 @@ interactions:
X-Permitted-Cross-Domain-Policies:
- none
X-Request-Id:
- 5f87aad0-752c-4461-b263-1bc79cdab024
- c8fd155e-e97d-4f7f-a78d-071a51610639
X-Runtime:
- '0.214669'
- '0.234727'
X-XSS-Protection:
- 1; mode=block
status:
Expand All @@ -71,17 +71,17 @@ interactions:
User-Agent:
- tests/v311
method: GET
uri: http://localhost:3000/api/v1/accounts/109337440686176140
uri: http://localhost:3000/api/v1/accounts/109367691239664003
response:
body:
string: '{"id":"109337440686176140","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":true,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-13T00:00:00.000Z","note":"","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,"last_status_at":null,"noindex":false,"emojis":[],"fields":[]}'
string: '{"id":"109367691239664003","username":"mastodonpy_test","acct":"mastodonpy_test","display_name":"","locked":true,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-19T00:00:00.000Z","note":"","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,"last_status_at":null,"noindex":false,"emojis":[],"fields":[]}'
headers:
Cache-Control:
- no-store
Content-Security-Policy:
- 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src
''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000;
style-src ''self'' http://localhost:3000 ''nonce-tY+95EW11KMGPxY0EiI23Q=='';
style-src ''self'' http://localhost:3000 ''nonce-M8bC+O0QQMi/uCOIhanm4w=='';
media-src ''self'' https: data: http://localhost:3000; frame-src ''self''
https:; manifest-src ''self'' http://localhost:3000; connect-src ''self''
data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000
Expand All @@ -91,7 +91,7 @@ interactions:
Content-Type:
- application/json; charset=utf-8
ETag:
- W/"2970de8ce37b5a44ea7311c90eeac598"
- W/"4931eaf82d803e4f4a0a7b82fa1ef2be"
Referrer-Policy:
- strict-origin-when-cross-origin
Transfer-Encoding:
Expand All @@ -107,9 +107,9 @@ interactions:
X-Permitted-Cross-Domain-Policies:
- none
X-Request-Id:
- cf3035ed-3f02-4fb5-8396-a85b724e294b
- 5ca1b674-003b-491f-a506-184d220289ca
X-Runtime:
- '0.012421'
- '0.013977'
X-XSS-Protection:
- 1; mode=block
status:
Expand Down
34 changes: 17 additions & 17 deletions tests/cassettes/test_account_block_unblock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ interactions:
uri: http://localhost:3000/api/v1/accounts/verify_credentials
response:
body:
string: '{"id":"109337440467895233","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-13T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":0,"last_status_at":null,"noindex":false,"source":{"privacy":"public","sensitive":false,"language":null,"note":"","fields":[],"follow_requests_count":0},"emojis":[],"fields":[],"role":{"id":"3","name":"Owner","permissions":"1048575","color":"","highlighted":true}}'
string: '{"id":"109367691027217373","username":"admin","acct":"admin","display_name":"","locked":false,"bot":false,"discoverable":null,"group":false,"created_at":"2022-11-19T00:00:00.000Z","note":"","url":"http://localhost:3000/@admin","avatar":"http://localhost:3000/avatars/original/missing.png","avatar_static":"http://localhost:3000/avatars/original/missing.png","header":"http://localhost:3000/headers/original/missing.png","header_static":"http://localhost:3000/headers/original/missing.png","followers_count":0,"following_count":0,"statuses_count":0,"last_status_at":null,"noindex":false,"source":{"privacy":"public","sensitive":false,"language":null,"note":"","fields":[],"follow_requests_count":0},"emojis":[],"fields":[],"role":{"id":"3","name":"Owner","permissions":"1048575","color":"","highlighted":true}}'
headers:
Cache-Control:
- no-store
Content-Security-Policy:
- 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src
''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000;
style-src ''self'' http://localhost:3000 ''nonce-ix4co9GwbPMPm5AA5vAweQ=='';
style-src ''self'' http://localhost:3000 ''nonce-Nhw/Ul7+7ECj+05xph2W2Q=='';
media-src ''self'' https: data: http://localhost:3000; frame-src ''self''
https:; manifest-src ''self'' http://localhost:3000; connect-src ''self''
data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000
Expand All @@ -33,7 +33,7 @@ interactions:
Content-Type:
- application/json; charset=utf-8
ETag:
- W/"91cc35ca6300f8fcd18839f0f85f1152"
- W/"26a41decc4abdc0f1b476cd7f7c6bc85"
Referrer-Policy:
- strict-origin-when-cross-origin
Transfer-Encoding:
Expand All @@ -49,9 +49,9 @@ interactions:
X-Permitted-Cross-Domain-Policies:
- none
X-Request-Id:
- 679d9222-d23e-4361-b943-219d3953d46e
- 8ce59347-ccd1-48d6-8fa3-c8d1cdb67130
X-Runtime:
- '0.011919'
- '0.013024'
X-XSS-Protection:
- 1; mode=block
status:
Expand All @@ -73,17 +73,17 @@ interactions:
User-Agent:
- tests/v311
method: POST
uri: http://localhost:3000/api/v1/accounts/109337440467895233/block
uri: http://localhost:3000/api/v1/accounts/109367691027217373/block
response:
body:
string: '{"id":"109337440467895233","following":false,"showing_reblogs":false,"notifying":false,"languages":null,"followed_by":false,"blocking":true,"blocked_by":false,"muting":false,"muting_notifications":false,"requested":false,"domain_blocking":false,"endorsed":false,"note":""}'
string: '{"id":"109367691027217373","following":false,"showing_reblogs":false,"notifying":false,"languages":null,"followed_by":false,"blocking":true,"blocked_by":false,"muting":false,"muting_notifications":false,"requested":false,"domain_blocking":false,"endorsed":false,"note":""}'
headers:
Cache-Control:
- no-store
Content-Security-Policy:
- 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src
''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000;
style-src ''self'' http://localhost:3000 ''nonce-LJtONwh/6bmMsRGNv5QFSQ=='';
style-src ''self'' http://localhost:3000 ''nonce-0u2U8wR2X+BuEcVsGw7/kw=='';
media-src ''self'' https: data: http://localhost:3000; frame-src ''self''
https:; manifest-src ''self'' http://localhost:3000; connect-src ''self''
data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000
Expand All @@ -93,7 +93,7 @@ interactions:
Content-Type:
- application/json; charset=utf-8
ETag:
- W/"d793df625e7199b85701d1d9ffeae421"
- W/"4f03a16894c0ac74b939acf9e91e6617"
Referrer-Policy:
- strict-origin-when-cross-origin
Transfer-Encoding:
Expand All @@ -109,9 +109,9 @@ interactions:
X-Permitted-Cross-Domain-Policies:
- none
X-Request-Id:
- 49eb0848-0627-439a-a0a6-6176d01f6df6
- 5ee6fde9-c4de-49cd-957a-a1220a01b4ea
X-Runtime:
- '0.021255'
- '0.022523'
X-XSS-Protection:
- 1; mode=block
status:
Expand All @@ -133,17 +133,17 @@ interactions:
User-Agent:
- tests/v311
method: POST
uri: http://localhost:3000/api/v1/accounts/109337440467895233/unblock
uri: http://localhost:3000/api/v1/accounts/109367691027217373/unblock
response:
body:
string: '{"id":"109337440467895233","following":false,"showing_reblogs":false,"notifying":false,"languages":null,"followed_by":false,"blocking":false,"blocked_by":false,"muting":false,"muting_notifications":false,"requested":false,"domain_blocking":false,"endorsed":false,"note":""}'
string: '{"id":"109367691027217373","following":false,"showing_reblogs":false,"notifying":false,"languages":null,"followed_by":false,"blocking":false,"blocked_by":false,"muting":false,"muting_notifications":false,"requested":false,"domain_blocking":false,"endorsed":false,"note":""}'
headers:
Cache-Control:
- no-store
Content-Security-Policy:
- 'base-uri ''none''; default-src ''none''; frame-ancestors ''none''; font-src
''self'' http://localhost:3000; img-src ''self'' https: data: blob: http://localhost:3000;
style-src ''self'' http://localhost:3000 ''nonce-T6MP6vrTHzh9AV4qStzfVg=='';
style-src ''self'' http://localhost:3000 ''nonce-x+TZvUv8aNWz/9BpE32gEg=='';
media-src ''self'' https: data: http://localhost:3000; frame-src ''self''
https:; manifest-src ''self'' http://localhost:3000; connect-src ''self''
data: blob: http://localhost:3000 http://localhost:3000 ws://localhost:4000
Expand All @@ -153,7 +153,7 @@ interactions:
Content-Type:
- application/json; charset=utf-8
ETag:
- W/"214f278429bf712708e952ee2355bf5e"
- W/"de4a48ee8790ee64cc1d3154ab11ba3a"
Referrer-Policy:
- strict-origin-when-cross-origin
Transfer-Encoding:
Expand All @@ -169,9 +169,9 @@ interactions:
X-Permitted-Cross-Domain-Policies:
- none
X-Request-Id:
- 8af3de42-f69d-4f68-b452-52bbd15cf9c0
- 275c1dd4-0334-4ea6-ab84-d2bca597ba0c
X-Runtime:
- '0.014651'
- '0.016299'
X-XSS-Protection:
- 1; mode=block
status:
Expand Down
Loading

0 comments on commit 98760f6

Please sign in to comment.