aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorThéo Le Calvar <[email protected]>2018-05-20 12:55:25 +0200
committerThéo Le Calvar <[email protected]>2018-05-20 12:55:25 +0200
commit1090d7476f08313202c82d4f6f3ea2ee81231a37 (patch)
tree6e0dd3dc6af8f50e9b0029613a69b107056ebd06 /tests
parent1800a9b2c176cc5f8f3b34d36233206e49d088d7 (diff)
downloadmastodon.py-1090d7476f08313202c82d4f6f3ea2ee81231a37.tar.gz
Fix optional args in account_update_credentials
avatar and header are now correctly ignored if not specified.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_account.py20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/test_account.py b/tests/test_account.py
index 240abca..2716ad1 100644
--- a/tests/test_account.py
+++ b/tests/test_account.py
@@ -92,3 +92,23 @@ def test_account_update_credentials(api):
92 header = image, 92 header = image,
93 header_mime_type = "image/jpeg") 93 header_mime_type = "image/jpeg")
94 assert account 94 assert account
95
96@pytest.mark.vcr(match_on=['path'])
97def test_account_update_credentials_no_header(api):
98 account = api.account_update_credentials(
99 display_name='John Lennon',
100 note='I walk funny',
101 avatar = "tests/image.jpg")
102 assert account
103
104@pytest.mark.vcr(match_on=['path'])
105def test_account_update_credentials_no_avatar(api):
106 with open('tests/image.jpg', 'rb') as f:
107 image = f.read()
108
109 account = api.account_update_credentials(
110 display_name='John Lennon',
111 note='I walk funny',
112 header = image,
113 header_mime_type = "image/jpeg")
114 assert account
Powered by cgit v1.2.3 (git 2.41.0)