From 465981ea9a5e56e6a8b2cebcc6102849e5bc5acf Mon Sep 17 00:00:00 2001 From: Lorenz Diener Date: Mon, 4 Jun 2018 21:20:43 +0200 Subject: Document and test focus --- tests/test_media.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'tests/test_media.py') diff --git a/tests/test_media.py b/tests/test_media.py index 118ca4b..ef116cd 100644 --- a/tests/test_media.py +++ b/tests/test_media.py @@ -5,8 +5,9 @@ import pytest def test_media_post(api, sensitive): media = api.media_post( 'tests/image.jpg', - description="John Lennon doing a funny walk") - + description="John Lennon doing a funny walk", + focus=(-0.5, 0.3)) + assert media status = api.status_post( @@ -21,6 +22,8 @@ def test_media_post(api, sensitive): assert status['sensitive'] == sensitive assert status['media_attachments'] assert status['media_attachments'][0]['description'] + assert status['media_attachments'][0]['meta']['focus']['x'] == -0.5 + assert status['media_attachments'][0]['meta']['focus']['y'] == 0.3 finally: api.status_delete(status['id']) -- cgit v1.2.3