Tests and documentation

This commit is contained in:
Mike Helmick 2013-06-27 19:20:43 -04:00
parent 173adee4a6
commit 3c637ddc7d
6 changed files with 71 additions and 3 deletions

View file

@ -3,7 +3,8 @@ from twython import Twython, TwythonError, TwythonAuthError
from .config import (
app_key, app_secret, oauth_token, oauth_token_secret,
protected_twitter_1, protected_twitter_2, screen_name,
test_tweet_id, test_list_id, access_token
test_tweet_id, test_list_id, access_token, test_tweet_object,
test_tweet_html
)
import time
@ -82,6 +83,11 @@ class TwythonAPITestCase(unittest.TestCase):
"""Test encoding UTF-8 works"""
self.api.encode('Twython is awesome!')
def test_html_for_tweet(self):
"""Test HTML for Twitter returns what we want"""
tweet_text = self.api.html_for_tweet(test_tweet_object)
self.assertEqual(test_tweet_html, tweet_text)
# Timelines
def test_get_mentions_timeline(self):
"""Test returning mentions timeline for authenticated user succeeds"""