Beispiel #1
0
def mock_mention_replies_to_another_tweet(mock_tweepy, twitter_user):
    original_tweet = Status()
    original_tweet.id = 1
    original_tweet.full_text = "$AMZN is a great buy in 2021"

    reply_tweet = Status()
    reply_tweet.id = 2
    reply_tweet.text = "@stock_reminder remind me of this in 1 year"
    reply_tweet.user = twitter_user
    reply_tweet.in_reply_to_status_id = original_tweet.id

    mock_tweepy.return_value.mentions_timeline.return_value = [reply_tweet]
    mock_tweepy.return_value.get_status.return_value = original_tweet
    return mock_tweepy
Beispiel #2
0
def status(twitter_user):
    tweet = Status()
    tweet.id = 1
    tweet.text = "Price of $AMZN in 3 months."
    tweet.user = twitter_user
    tweet.in_reply_to_status_id = None
    return tweet
Beispiel #3
0
def mock_mention_replies_to_extended_tweet(mock_tweepy, twitter_user):
    original_tweet = Status()
    original_tweet.id = 1
    original_tweet.full_text = ("You wouldn’t believe it, but right now, "
                                "I think we’re looking at potentially 100% "
                                "stock returns in ~3 years for:\n\n1. $AMZN "
                                "at $3,055\n2. $TSLA at $661\n3. $JNJ at "
                                "$160\n Zero interest in debating!")

    reply_tweet = Status()
    reply_tweet.id = 2
    reply_tweet.text = "@stock_reminder remind me of this in 3 years"
    reply_tweet.user = twitter_user
    reply_tweet.in_reply_to_status_id = original_tweet.id

    mock_tweepy.return_value.mentions_timeline.return_value = [reply_tweet]
    mock_tweepy.return_value.get_status.return_value = original_tweet
    return mock_tweepy
Beispiel #4
0
def status_with_multiple_stocks(twitter_user):
    tweet = Status()
    tweet.id = 1
    tweet.text = "Remind me of $AMZN, $MSFT, $AAPL and $BABA in 3 months."
    tweet.user = twitter_user
    return tweet
Beispiel #5
0
def status(twitter_user):
    tweet = Status()
    tweet.id = 1
    tweet.text = "Price of $AMZN in 3 months."
    tweet.user = twitter_user
    return tweet
Beispiel #6
0
def status(twitter_user):
    tweet = Status()
    tweet.id = 1
    tweet.text = "What is the current price of $BABA?"
    tweet.user = twitter_user
    return tweet