More test coverage

This commit is contained in:
Mike Helmick 2013-06-11 15:00:39 -04:00
parent 6ce39f9921
commit 2f5f496ead
3 changed files with 16 additions and 19 deletions

View file

@ -35,7 +35,11 @@ class TwythonAuthTestCase(unittest.TestCase):
self.assertRaises(TwythonError, self.oauth2_api.get_authentication_tokens)
def test_get_authorization_tokens_raises_error_when_oauth2(self):
"""Test when API is set for OAuth 2, get_authentication_tokens raises
"""Test when API is set for OAuth 2, get_authorized_tokens raises
a TwythonError"""
self.assertRaises(TwythonError, self.oauth2_api.get_authorized_tokens,
'BAD_OAUTH_VERIFIER')
def test_obtain_access_token(self):
"""Test obtaining an Application Only OAuth 2 access token succeeds"""
self.oauth2_api.obtain_access_token()

View file

@ -16,7 +16,8 @@ class TwythonAPITestCase(unittest.TestCase):
client_args = {
'headers': {
'User-Agent': '__twython__ Test'
}
},
'allow_redirects': False
}
self.api = Twython(app_key, app_secret,