示例#1
0
 def test_html_content(self):
     src = '@username0 '
     hcp = TweetContentParser()
     content_html = hcp.parse(src)
     self.assertEqual('<a href="/u/username0">@username0</a>', content_html)
     user_set = hcp.context_data('at', 'user_set')
     self.assertTrue('username0' in user_set)
 def test_tags(self):
     hcp = TweetContentParser()
     content_html = hcp.parse('#ss#')
     self.assertEqual('<a href="/tag/?tag=ss">ss</a>', content_html)