Update from 3.4.0 master
This commit is contained in:
parent
af6262ef80
commit
6eda734082
9 changed files with 44 additions and 19 deletions
|
|
@ -1,7 +1,7 @@
|
|||
from twython import Twython, TwythonError, TwythonAuthError, TwythonRateLimitError
|
||||
|
||||
from .config import (
|
||||
test_tweet_object, test_tweet_html, unittest
|
||||
test_tweet_object, test_tweet_html, test_tweet_symbols_object, unittest
|
||||
)
|
||||
|
||||
import responses
|
||||
|
|
@ -324,3 +324,10 @@ class TwythonAPITestCase(unittest.TestCase):
|
|||
del(tweet['entities'])
|
||||
tweet_text = self.api.html_for_tweet(tweet)
|
||||
self.assertEqual(tweet['text'], tweet_text)
|
||||
|
||||
def test_html_for_tweet_symbols(self):
|
||||
tweet_text = self.api.html_for_tweet(test_tweet_symbols_object)
|
||||
# Should only link symbols listed in entities:
|
||||
self.assertTrue('<a href="https://twitter.com/search?q=%24AAPL" class="twython-symbol">$AAPL</a>' in tweet_text)
|
||||
self.assertTrue('<a href="https://twitter.com/search?q=%24ANOTHER" class="twython-symbol">$ANOTHER</a>' not in tweet_text)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue