1717# Test case 1: Post a Tweet
1818print ("\n Running Test Case 1: Post a Tweet" )
1919post_tweet_fn = game_twitter_plugin .get_function ('post_tweet' )
20- post_tweet_fn ("Hello world! This is a test tweet from the GAME Twitter Plugin!" )
20+ post_tweet_fn (tweet = "Hello world! This is a test tweet from the GAME Twitter Plugin!" , media_ids = [] )
2121print ("Posted tweet!" )
2222
2323# Test case 2: Reply to a Tweet
2424print ("\n Running Test Case 2: Reply to a Tweet" )
2525reply_tweet_fn = game_twitter_plugin .get_function ('reply_tweet' )
26- reply_tweet_fn (tweet_id = 1879472470362816626 , reply = "Hey! This is a test reply!" )
26+ reply_tweet_fn (tweet_id = 1879472470362816626 , reply = "Hey! This is a test reply!" , media_ids = [] )
2727print ("Replied to tweet!" )
2828
2929# Test case 3: Quote a Tweet
3030print ("\n Running Test Case 3: Quote a Tweet" )
3131quote_tweet_fn = game_twitter_plugin .get_function ('quote_tweet' )
32- quote_tweet_fn (tweet_id = 1879472470362816626 , quote = "Hey! This is a test quote tweet!" )
32+ quote_tweet_fn (tweet_id = 1879472470362816626 , quote = "Hey! This is a test quote tweet!" , media_ids = [] )
3333print ("Quoted tweet!" )
3434
3535# Test case 4: Search Tweets
4242print ("\n Running Test Case 5: Get details of authenticated user" )
4343get_authenticated_user_fn = game_twitter_plugin .get_function ('get_authenticated_user' )
4444response = get_authenticated_user_fn ()
45- print (f"Got details of authenticated user: { response } " )
45+ print (f"Got details of authenticated user: { response } " )
46+
47+ # Test case 6: Get my mentions
48+ print ("\n Running Test Case 6: Get my mentions" )
49+ mentions_fn = game_twitter_plugin .get_function ('mentions' )
50+ response = mentions_fn ()
51+ print (f"My mentions: { response } " )
52+
53+ # Test case 7: Get my followers
54+ print ("\n Running Test Case 7: Get list of users who are followers of me" )
55+ followers_fn = game_twitter_plugin .get_function ('followers' )
56+ response = followers_fn ()
57+ print (f"My followers: { response } " )
58+
59+ # Test case 8: Get ppl following me
60+ print ("\n Running Test Case 8: Get list of users I am following" )
61+ following_fn = game_twitter_plugin .get_function ('following' )
62+ response = following_fn ()
63+ print (f"Users I am following: { response } " )
64+
65+ # Test case 9: Upload media
66+ print ("\n Running Test Case 9: Upload media" )
67+ with open ("sample_media/media_file.png" , "rb" ) as f :
68+ media_id = game_twitter_plugin .upload_media (f )
69+ print (f"Uploaded media_id: { media_id } " )
0 commit comments