From 01e52ccd8fe9dda667e0a7cc1a872a0437a10c8e Mon Sep 17 00:00:00 2001 From: Lorenz Diener Date: Tue, 5 Jun 2018 22:52:18 +0200 Subject: Add push tests --- tests/test_media.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'tests/test_media.py') diff --git a/tests/test_media.py b/tests/test_media.py index 6e7bf73..f2c3b2f 100644 --- a/tests/test_media.py +++ b/tests/test_media.py @@ -27,6 +27,25 @@ def test_media_post(api, sensitive): finally: api.status_delete(status['id']) +@pytest.mark.vcr(match_on=['path']) +def test_media_update(api): + media = api.media_post( + 'tests/image.jpg', + description="John Lennon doing a funny walk", + focus=(-0.5, 0.3)) + + assert media + + media_up = api.media_update( + media, + description="John Lennon doing a cool walk", + focus=(0.69, 0.69)) + + assert media_up + assert media_up['description'] == "John Lennon doing a cool walk" + assert media_up['meta']['focus']['x'] == 0.69 + assert media_up['meta']['focus']['y'] == 0.69 + @pytest.mark.vcr(match_on=['path']) def test_media_post_file(api): with open('tests/image.jpg', 'rb') as f: -- cgit v1.2.3