Skip to content

Commit 66e869d

Browse files
committed
prettify GAME twitter test suite print statements
1 parent 49b6b6d commit 66e869d

File tree

2 files changed

+14
-16
lines changed

2 files changed

+14
-16
lines changed

plugins/twitter/test_game_twitter.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,33 +15,31 @@
1515
game_twitter_plugin = GameTwitterPlugin(options)
1616

1717
# Test case 1: Post a Tweet
18-
print("Running Test Case 1: Post a Tweet")
18+
print("\nRunning Test Case 1: Post a Tweet")
1919
post_tweet_fn = game_twitter_plugin.get_function('post_tweet')
2020
post_tweet_fn("Hello world! This is a test tweet from the GAME Twitter Plugin!")
2121
print("Posted tweet!")
2222

2323
# Test case 2: Reply to a Tweet
24-
print("Running Test Case 2: Reply to a Tweet")
24+
print("\nRunning Test Case 2: Reply to a Tweet")
2525
reply_tweet_fn = game_twitter_plugin.get_function('reply_tweet')
2626
reply_tweet_fn(tweet_id=1879472470362816626, reply="Hey! This is a test reply!")
2727
print("Replied to tweet!")
2828

2929
# Test case 3: Quote a Tweet
30-
print("Running Test Case 3: Quote a Tweet")
30+
print("\nRunning Test Case 3: Quote a Tweet")
3131
quote_tweet_fn = game_twitter_plugin.get_function('quote_tweet')
3232
quote_tweet_fn(tweet_id=1879472470362816626, quote="Hey! This is a test quote tweet!")
3333
print("Quoted tweet!")
3434

3535
# Test case 4: Search Tweets
36-
print("Running Test Case 4: Search Tweets")
36+
print("\nRunning Test Case 4: Search Tweets")
3737
search_tweets_fn = game_twitter_plugin.get_function('search_tweets')
3838
response = search_tweets_fn(query="Python")
39-
print(response)
40-
print("Searched tweets!")
39+
print(f"Searched tweets: {response}")
4140

4241
# Test case 5: Get authenticated user
43-
print("Running Test Case 5: Get details of authenticated user")
42+
print("\nRunning Test Case 5: Get details of authenticated user")
4443
get_authenticated_user_fn = game_twitter_plugin.get_function('get_authenticated_user')
4544
response = get_authenticated_user_fn()
46-
print(response)
47-
print("Got details of authenticated user!")
45+
print(f"Got details of authenticated user: {response}")

plugins/twitter/test_twitter.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,43 +19,43 @@
1919
twitter_plugin = TwitterPlugin(options)
2020

2121
# Test case 1: Post a Tweet
22-
print("Running Test Case 1: Post a Tweet")
22+
print("\nRunning Test Case 1: Post a Tweet")
2323
post_tweet_fn = twitter_plugin.get_function('post_tweet')
2424
post_tweet_fn("Hello world! This is a test tweet from the Twitter Plugin!")
2525
print("Posted tweet!")
2626

2727
# Test case 2: Reply to a Tweet
28-
print("Running Test Case 2: Reply to a Tweet")
28+
print("\nRunning Test Case 2: Reply to a Tweet")
2929
reply_tweet_fn = twitter_plugin.get_function('reply_tweet')
3030
reply_tweet_fn(tweet_id=1879472470362816626, reply="Hey! This is a test reply!")
3131
print("Replied to tweet!")
3232

3333
# Test case 3: Like a Tweet
34-
print("Running Test Case 3: Like a Tweet")
34+
print("\nRunning Test Case 3: Like a Tweet")
3535
like_tweet_fn = twitter_plugin.get_function('like_tweet')
3636
like_tweet_fn(tweet_id=1879472470362816626)
3737
print("Liked tweet!")
3838

3939
# Test case 4: Quote a Tweet
40-
print("Running Test Case 4: Quote a Tweet")
40+
print("\nRunning Test Case 4: Quote a Tweet")
4141
quote_tweet_fn = twitter_plugin.get_function('quote_tweet')
4242
quote_tweet_fn(tweet_id=1879472470362816626, quote="Hey! This is a test quote tweet!")
4343
print("Quoted tweet!")
4444

4545
# Test case 5: Get Metrics
46-
print("Running Test Case 5: Get Metrics")
46+
print("\nRunning Test Case 5: Get Metrics")
4747
get_metrics_fn = twitter_plugin.get_function('get_metrics')
4848
metrics = get_metrics_fn()
4949
print("Metrics:", metrics)
5050

5151
# Test case 6: Get User From Handle
52-
print("Running Test Case 6: Get User From Handle")
52+
print("\nRunning Test Case 6: Get User From Handle")
5353
get_user_fn = twitter_plugin.get_function('get_user_from_handle')
5454
user_id = get_user_fn('celesteanglm')
5555
print("user_id:", user_id)
5656

5757
# Test case 7: Get User Mentions
58-
print("Running Test Case 7: Get User Mentions")
58+
print("\nRunning Test Case 7: Get User Mentions")
5959
get_user_fn = twitter_plugin.get_function("get_user_from_handle")
6060
user_id = get_user_fn("GAME_Virtuals")
6161
get_user_mentions_fn = twitter_plugin.get_function("get_user_mentions")

0 commit comments

Comments
 (0)