aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorenz Diener <[email protected]>2018-05-06 15:55:32 +0200
committerGitHub <[email protected]>2018-05-06 15:55:32 +0200
commitca0ea36c6edd58dc15e5fd7f31f24ba5097d6e8d (patch)
tree98328e8776447334b19592992016d9b7f16ae98b /tests/test_account.py
parent06e32c14bcb5a1ef1a5e618a1b413ea011416c9d (diff)
parentfbd4122fec092bff6b1cc9f44dfeda6ee693c41b (diff)
downloadmastodon.py-ca0ea36c6edd58dc15e5fd7f31f24ba5097d6e8d.tar.gz
Merge branch 'master' into stream-timeout
Diffstat (limited to 'tests/test_account.py')
-rw-r--r--tests/test_account.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/tests/test_account.py b/tests/test_account.py
index dac65ac..240abca 100644
--- a/tests/test_account.py
+++ b/tests/test_account.py
@@ -80,17 +80,15 @@ def test_blocks(api):
80 assert isinstance(blocks, list) 80 assert isinstance(blocks, list)
81 81
82 82
83@pytest.mark.vcr() 83@pytest.mark.vcr(match_on=['path'])
84def test_account_update_credentials(api): 84def test_account_update_credentials(api):
85 import base64
86 with open('tests/image.jpg', 'rb') as f: 85 with open('tests/image.jpg', 'rb') as f:
87 image = f.read() 86 image = f.read()
88 b64_image = base64.b64encode(image)
89 data_uri = b'data:image/jpeg;base64,' + b64_image
90 87
91 account = api.account_update_credentials( 88 account = api.account_update_credentials(
92 display_name='John Lennon', 89 display_name='John Lennon',
93 note='I walk funny', 90 note='I walk funny',
94 avatar = data_uri, 91 avatar = "tests/image.jpg",
95 header = data_uri) 92 header = image,
93 header_mime_type = "image/jpeg")
96 assert account 94 assert account
Powered by cgit v1.2.3 (git 2.41.0)