diff options
author | Lorenz Diener <[email protected]> | 2018-04-18 22:00:35 +0200 |
---|---|---|
committer | Lorenz Diener <[email protected]> | 2018-04-18 22:00:35 +0200 |
commit | 64ec9e20987072692227d8817d9fd99d497fea5e (patch) | |
tree | 7c358d3ce80c30fd59af9e615e99824453eb2f8d /tests/test_account.py | |
parent | a825905b571697835d762ac63098491cbc4a0936 (diff) | |
download | mastodon.py-64ec9e20987072692227d8817d9fd99d497fea5e.tar.gz |
Update the tests
Diffstat (limited to 'tests/test_account.py')
-rw-r--r-- | tests/test_account.py | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/test_account.py b/tests/test_account.py index dac65ac..a0072f4 100644 --- a/tests/test_account.py +++ b/tests/test_account.py | |||
@@ -82,15 +82,13 @@ def test_blocks(api): | |||
82 | 82 | ||
83 | @pytest.mark.vcr() | 83 | @pytest.mark.vcr() |
84 | def test_account_update_credentials(api): | 84 | def 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 |