MCPcopy Create free account
hub / github.com/ryanmcgrath/twython / test_reply

Method test_reply

tests/test_html_for_tweet.py:31–36  ·  view source on GitHub ↗

Test HTML for Tweet links the replied-to username.

(self)

Source from the content-addressed store, hash-verified

29 '<a href="http://t.co/FCmXyI6VHd" class="twython-url">google.com</a> is a <a href="https://twitter.com/search?q=%23cool" class="twython-hashtag">#cool</a> site, lol! <a href="https://twitter.com/mikehelmick" class="twython-mention">@mikehelmick</a> shd <a href="https://twitter.com/search?q=%23checkitout" class="twython-hashtag">#checkitout</a>. Love, <a href="https://twitter.com/__twython__" class="twython-mention">@__twython__</a> <a href="https://t.co/67pwRvY6z9" class="twython-url">github.com</a> <a href="http://t.co/N6InAO4B71" class="twython-media">pic.twitter.com/N6InAO4B71</a>')
30
31 def test_reply(self):
32 """Test HTML for Tweet links the replied-to username."""
33 tweet_object = self.load_tweet('reply')
34 tweet_text = self.api.html_for_tweet(tweet_object)
35 self.assertEqual(tweet_text,
36 u'<span class="twython-tweet-prefix"><a href="https://twitter.com/philgyford" class="twython-mention">@philgyford</a> </span>Here’s a test tweet that goes on as much as possible and includes an image. Hi to my fans in testland!<span class="twython-tweet-suffix"> https://t.co/tzhyk2QWSr</span>')
37
38 def test_expanded_url(self):
39 """Test using expanded url in HTML for Tweet displays full urls"""

Callers

nothing calls this directly

Calls 2

load_tweetMethod · 0.95
html_for_tweetMethod · 0.80

Tested by

no test coverage detected