<s> from twython import Twython , TwythonError , TwythonAuthError <EOL> from . config import ( <EOL> app_key , app_secret , oauth_token , oauth_token_secret , <EOL> protected_twitter_1 , protected_twitter_2 , screen_name , <EOL> test_tweet_id , test_list_slug , test_list_owner_screen_name , <EOL> access_token , test_tweet_object , test_tweet_html , unittest <EOL> ) <EOL> import time <EOL> class TwythonEndpointsTestCase ( unittest . TestCase ) : <EOL> def setUp ( self ) : <EOL> client_args = { <EOL> '<STR_LIT>' : { <EOL> '<STR_LIT>' : '<STR_LIT>' <EOL> } , <EOL> '<STR_LIT>' : False <EOL> } <EOL> oauth2_client_args = { <EOL> '<STR_LIT>' : { } <EOL> } <EOL> self . api = Twython ( app_key , app_secret , <EOL> oauth_token , oauth_token_secret , <EOL> client_args = client_args ) <EOL> self . oauth2_api = Twython ( app_key , access_token = access_token , <EOL> client_args = oauth2_client_args ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_get_mentions_timeline ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . get_mentions_timeline ( ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_get_user_timeline ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . get_user_timeline ( ) <EOL> self . api . get_user_timeline ( screen_name = '<STR_LIT>' ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_get_protected_user_timeline_following ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . get_user_timeline ( screen_name = protected_twitter_1 ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_get_protected_user_timeline_not_following ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertRaises ( TwythonAuthError , self . api . get_user_timeline , <EOL> screen_name = protected_twitter_2 ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_retweeted_of_me ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . retweeted_of_me ( ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_get_home_timeline ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . get_home_timeline ( ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_get_retweets ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . get_retweets ( id = test_tweet_id ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_show_status ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . show_status ( id = test_tweet_id ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_update_and_destroy_status ( self ) : <EOL> """<STR_LIT>""" <EOL> status = self . api . update_status ( status = '<STR_LIT>' % int ( time . time ( ) ) ) <EOL> self . api . destroy_status ( id = status [ '<STR_LIT>' ] ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_get_oembed_tweet ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . get_oembed_tweet ( id = '<STR_LIT>' ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_get_retweeters_ids ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . get_retweeters_ids ( id = '<STR_LIT>' ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_search ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . search ( q = '<STR_LIT>' ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_get_direct_messages ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . get_direct_messages ( ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_get_sent_messages ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . get_sent_messages ( ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_send_get_and_destroy_direct_message ( self ) : <EOL> """<STR_LIT>""" <EOL> message = self . api . send_direct_message ( screen_name = protected_twitter_1 , <EOL> text = '<STR_LIT>' % int ( time . time ( ) ) ) <EOL> self . api . get_direct_message ( id = message [ '<STR_LIT>' ] ) <EOL> self . api . destroy_direct_message ( id = message [ '<STR_LIT>' ] ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_send_direct_message_to_non_follower ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertRaises ( TwythonError , self . api . send_direct_message , <EOL> screen_name = protected_twitter_2 , text = '<STR_LIT>' % int ( time . time ( ) ) ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_get_user_ids_of_blocked_retweets ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . get_user_ids_of_blocked_retweets ( stringify_ids = True ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_get_friends_ids ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . get_friends_ids ( ) <EOL> self . api . get_friends_ids ( screen_name = '<STR_LIT>' ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_get_followers_ids ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . get_followers_ids ( ) <EOL> self . api . get_followers_ids ( screen_name = '<STR_LIT>' ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_lookup_friendships ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . lookup_friendships ( screen_name = '<STR_LIT>' ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_get_incoming_friendship_ids ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . get_incoming_friendship_ids ( ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_get_outgoing_friendship_ids ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . get_outgoing_friendship_ids ( ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_create_friendship ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . create_friendship ( screen_name = '<STR_LIT>' ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_destroy_friendship ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . destroy_friendship ( screen_name = '<STR_LIT>' ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_update_friendship ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . update_friendship ( screen_name = protected_twitter_1 , <EOL> retweets = '<STR_LIT:true>' ) <EOL> self . api . update_friendship ( screen_name = protected_twitter_1 , <EOL> retweets = False ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_show_friendships ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . show_friendship ( target_screen_name = protected_twitter_1 ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_get_friends_list ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . get_friends_list ( ) <EOL> self . api . get_friends_list ( screen_name = '<STR_LIT>' ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_get_followers_list ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . get_followers_list ( ) <EOL> self . api . get_followers_list ( screen_name = '<STR_LIT>' ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_get_account_settings ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . get_account_settings ( ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_verify_credentials ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . verify_credentials ( ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_update_account_settings ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . update_account_settings ( lang = '<STR_LIT>' ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_update_delivery_service ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertRaises ( TwythonError , self . api . update_delivery_service , <EOL> device = '<STR_LIT:none>' ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_update_profile ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . update_profile ( include_entities = '<STR_LIT:true>' ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_update_profile_colors ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . update_profile_colors ( profile_background_color = '<STR_LIT>' ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_list_blocks ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . list_blocks ( ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_list_block_ids ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . list_block_ids ( ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_create_block ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . create_block ( screen_name = '<STR_LIT>' ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_destroy_block ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . destroy_block ( screen_name = '<STR_LIT>' ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_lookup_user ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . lookup_user ( screen_name = '<STR_LIT>' ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_show_user ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . show_user ( screen_name = '<STR_LIT>' ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_search_users ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . search_users ( q = '<STR_LIT>' ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_get_contributees ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . get_contributees ( screen_name = '<STR_LIT>' ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_get_contributors ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertRaises ( TwythonError , self . api . get_contributors , <EOL> screen_name = screen_name ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_remove_profile_banner ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . remove_profile_banner ( ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_get_profile_banner_sizes ( self ) : <EOL> """<STR_LIT>""" <EOL> self . assertRaises ( TwythonError , self . api . get_profile_banner_sizes ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_list_mutes ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . list_mutes ( ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_list_mute_ids ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . list_mute_ids ( ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_create_mute ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . create_mute ( screen_name = '<STR_LIT>' ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_destroy_mute ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . destroy_mute ( screen_name = '<STR_LIT>' ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_get_user_suggestions_by_slug ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . get_user_suggestions_by_slug ( slug = '<STR_LIT>' ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_get_user_suggestions ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . get_user_suggestions ( ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_get_user_suggestions_statuses_by_slug ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . get_user_suggestions_statuses_by_slug ( slug = '<STR_LIT>' ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_get_favorites ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . get_favorites ( ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_create_and_destroy_favorite ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . create_favorite ( id = test_tweet_id ) <EOL> self . api . destroy_favorite ( id = test_tweet_id ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_show_lists ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . show_lists ( screen_name = '<STR_LIT>' ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_get_list_statuses ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . get_list_statuses ( slug = test_list_slug , <EOL> owner_screen_name = test_list_owner_screen_name ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_create_update_destroy_list_add_remove_list_members ( self ) : <EOL> """<STR_LIT>""" <EOL> the_list = self . api . create_list ( name = '<STR_LIT>' % int ( time . time ( ) ) ) <EOL> list_id = the_list [ '<STR_LIT>' ] <EOL> self . api . update_list ( list_id = list_id , name = '<STR_LIT>' % int ( time . time ( ) ) ) <EOL> screen_names = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> self . api . create_list_members ( list_id = list_id , <EOL> screen_name = screen_names ) <EOL> self . api . delete_list_members ( list_id = list_id , <EOL> screen_name = screen_names ) <EOL> self . api . add_list_member ( list_id = list_id , screen_name = '<STR_LIT>' ) <EOL> self . api . delete_list_member ( list_id = list_id , <EOL> screen_name = '<STR_LIT>' ) <EOL> self . api . delete_list ( list_id = list_id ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_get_list_memberships ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . get_list_memberships ( ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_get_list_subscribers ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . get_list_subscribers ( slug = test_list_slug , <EOL> owner_screen_name = test_list_owner_screen_name ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_subscribe_is_subbed_and_unsubscribe_to_list ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . subscribe_to_list ( slug = test_list_slug , <EOL> owner_screen_name = test_list_owner_screen_name ) <EOL> self . api . is_list_subscriber ( slug = test_list_slug , <EOL> owner_screen_name = test_list_owner_screen_name , <EOL> screen_name = screen_name ) <EOL> self . api . unsubscribe_from_list ( slug = test_list_slug , <EOL> owner_screen_name = test_list_owner_screen_name ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_is_list_member ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . is_list_member ( slug = test_list_slug , <EOL> owner_screen_name = test_list_owner_screen_name , <EOL> screen_name = '<STR_LIT>' ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_get_list_members ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . get_list_members ( slug = test_list_slug , <EOL> owner_screen_name = test_list_owner_screen_name ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_get_specific_list ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . get_specific_list ( slug = test_list_slug , <EOL> owner_screen_name = test_list_owner_screen_name ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_get_list_subscriptions ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . get_list_subscriptions ( screen_name = '<STR_LIT>' ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_show_owned_lists ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . show_owned_lists ( screen_name = '<STR_LIT>' ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_get_saved_searches ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . get_saved_searches ( ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_create_get_destroy_saved_search ( self ) : <EOL> """<STR_LIT>""" <EOL> saved_search = self . api . create_saved_search ( query = '<STR_LIT>' ) <EOL> saved_search_id = saved_search [ '<STR_LIT>' ] <EOL> self . api . show_saved_search ( id = saved_search_id ) <EOL> self . api . destroy_saved_search ( id = saved_search_id ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_get_geo_info ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . get_geo_info ( place_id = '<STR_LIT>' ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_reverse_geo_code ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . reverse_geocode ( lat = '<STR_LIT>' , long = '<STR_LIT>' ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_search_geo ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . search_geo ( query = '<STR_LIT>' ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_get_similar_places ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . get_similar_places ( lat = '<STR_LIT>' , long = '<STR_LIT>' , name = '<STR_LIT>' ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_get_place_trends ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . get_place_trends ( id = <NUM_LIT:1> ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_get_available_trends ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . get_available_trends ( ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_get_closest_trends ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . get_closest_trends ( lat = '<STR_LIT>' , long = '<STR_LIT>' ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_get_twitter_configuration ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . get_twitter_configuration ( ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_get_supported_languages ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . get_supported_languages ( ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_privacy_policy ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . get_privacy_policy ( ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_get_tos ( self ) : <EOL> """<STR_LIT>""" <EOL> self . api . get_tos ( ) <EOL> @ unittest . skip ( '<STR_LIT>' ) <EOL> def test_get_application_rate_limit_status ( self ) : <EOL> """<STR_LIT>""" <EOL> self . oauth2_api . get_application_rate_limit_status ( ) </s>
