Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.2:Update
python-python-twitter
python-python-twitter-fix-test.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File python-python-twitter-fix-test.patch of Package python-python-twitter
diff --git a/testdata/direct_messages/post_post_direct_message.json b/testdata/direct_messages/post_post_direct_message.json index c4c2d59f..9e861211 100644 --- a/testdata/direct_messages/post_post_direct_message.json +++ b/testdata/direct_messages/post_post_direct_message.json @@ -1 +1 @@ -{"sender_id_str": "372018022", "entities": {"urls": [{"expanded_url": "https://twitter.com/CamilleStein/status/854322543364382720", "indices": [0, 23], "url": "https://t.co/L4MIplKUwR", "display_url": "twitter.com/CamilleStein/s\u2026"}], "symbols": [], "hashtags": [], "user_mentions": []}, "recipient_id": 3206731269, "text": "https://t.co/L4MIplKUwR", "id_str": "855194351294656515", "sender_id": 372018022, "id": 855194351294656515, "created_at": "Thu Apr 20 22:59:56 +0000 2017", "recipient_id_str": "3206731269", "recipient": {"is_translation_enabled": false, "following": true, "name": "The GIFing Bot", "profile_image_url": "http://pbs.twimg.com/profile_images/592359786659880960/IwQsKZ7b_normal.png", "profile_sidebar_border_color": "000000", "followers_count": 84, "created_at": "Sat Apr 25 16:31:07 +0000 2015", "profile_link_color": "02B400", "is_translator": false, "id": 3206731269, "profile_sidebar_fill_color": "000000", "has_extended_profile": false, "profile_background_tile": false, "profile_use_background_image": false, "default_profile_image": false, "profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png", "lang": "en", "verified": false, "favourites_count": 0, "protected": false, "notifications": false, "friends_count": 100, "listed_count": 7, "location": "", "statuses_count": 19, "entities": {"url": {"urls": [{"expanded_url": "http://iseverythingstilltheworst.com/projects/the-gifing-bot/", "indices": [0, 23], "url": "https://t.co/BTsv2OJnqv", "display_url": "iseverythingstilltheworst.com/projects/the-g\u2026"}]}, "description": {"urls": []}}, "url": "https://t.co/BTsv2OJnqv", "utc_offset": null, "time_zone": null, "profile_background_color": "000000", "id_str": "3206731269", "description": "DM me a tweet with a GIF in it and I'll make it into an actual GIF!!", "follow_request_sent": false, "screen_name": "TheGIFingBot", "profile_text_color": "000000", "translator_type": "none", "profile_image_url_https": "https://pbs.twimg.com/profile_images/592359786659880960/IwQsKZ7b_normal.png", "profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png", "contributors_enabled": false, "default_profile": false, "geo_enabled": false}, "sender": {"is_translation_enabled": false, "following": false, "name": "Jeremy", "profile_image_url": "http://pbs.twimg.com/profile_images/800076020741246976/fMpwMcBJ_normal.jpg", "profile_sidebar_border_color": "000000", "followers_count": 142, "created_at": "Sun Sep 11 23:49:28 +0000 2011", "profile_link_color": "EE3355", "is_translator": false, "id": 372018022, "profile_sidebar_fill_color": "000000", "has_extended_profile": false, "profile_background_tile": false, "profile_use_background_image": false, "default_profile_image": false, "profile_background_image_url_https": "https://abs.twimg.com/images/themes/theme1/bg.png", "lang": "en", "verified": false, "favourites_count": 7546, "protected": false, "notifications": false, "friends_count": 593, "listed_count": 11, "location": "philly", "statuses_count": 1785, "entities": {"url": {"urls": [{"expanded_url": "http://iseverythingstilltheworst.com", "indices": [0, 23], "url": "https://t.co/wtg3XyREnj", "display_url": "iseverythingstilltheworst.com"}]}, "description": {"urls": []}}, "url": "https://t.co/wtg3XyREnj", "utc_offset": -14400, "time_zone": "Eastern Time (US & Canada)", "profile_background_color": "FFFFFF", "id_str": "372018022", "description": "these people have addresses | #botally", "follow_request_sent": false, "screen_name": "__jcbl__", "profile_text_color": "000000", "translator_type": "none", "profile_image_url_https": "https://pbs.twimg.com/profile_images/800076020741246976/fMpwMcBJ_normal.jpg", "profile_background_image_url": "http://abs.twimg.com/images/themes/theme1/bg.png", "profile_banner_url": "https://pbs.twimg.com/profile_banners/372018022/1475799101", "contributors_enabled": false, "default_profile": false, "geo_enabled": false}, "sender_screen_name": "__jcbl__", "recipient_screen_name": "TheGIFingBot"} \ No newline at end of file +{"event": {"type": "message_create", "id": "1046388258840748037", "created_timestamp": "1538313376518", "message_create": {"target": {"recipient_id": "372018022"}, "sender_id": "372018022", "message_data": {"text": "hello", "entities": {"hashtags": [], "symbols": [], "user_mentions": [], "urls": []}}}}} \ No newline at end of file diff --git a/tests/test_direct_messages.py b/tests/test_direct_messages.py index 348ea525..fa9108c6 100644 --- a/tests/test_direct_messages.py +++ b/tests/test_direct_messages.py @@ -63,9 +63,9 @@ def test_post_direct_message(): with open('testdata/direct_messages/post_post_direct_message.json', 'r') as f: responses.add(POST, DEFAULT_URL, body=f.read()) resp = api.PostDirectMessage(user_id='372018022', - text='https://t.co/L4MIplKUwR') + text='hello') assert isinstance(resp, twitter.DirectMessage) - assert resp.text == 'https://t.co/L4MIplKUwR' + assert resp.text == 'hello' @responses.activate
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor