示例#1
0
文件: tests.py 项目: rickeyski/causal
    def test_add_image_html_yfrogpic(self):
        """Test replacing yfrog pic text with a link to yfrog pic.
        """

        tweet = "Some text #ahashtag http://yfrog.com/b9hmwkj some more text."
        converted_tweet = 'Some text #ahashtag http://yfrog.com/b9hmwkj some more text. <br/> <a href="http://yfrog.com/b9hmwkj"><img src="http://yfrog.com/b9hmwkj.th.jpg"/></a>'
        self.assertEqual(_add_image_html(tweet), converted_tweet)
示例#2
0
文件: tests.py 项目: rickeyski/causal
    def test_add_image_html_twitpic(self):
        """Test replacing twitpic text with a link to twitpic.
        """

        tweet = "Some text #ahashtag http://twitpic.com/354bkr some more text."
        converted_tweet = 'Some text #ahashtag http://twitpic.com/354bkr some more text. <br/> <a href="http://twitpic.com/354bkr"><img src="http://twitpic.com/show/mini/354bkr"/></a>'
        self.assertEqual(_add_image_html(tweet), converted_tweet)