Merge "Clean up oauth auth plugin code"

This commit is contained in:
Jenkins
2014-05-30 08:07:27 +00:00
committed by Gerrit Code Review
2 changed files with 1 additions and 7 deletions

View File

@@ -260,7 +260,7 @@ class AuthenticateWithOAuthTests(TokenTests):
access_secret=access_secret) access_secret=access_secret)
s = session.Session(auth=a) s = session.Session(auth=a)
t = s.get_token() t = s.get_token()
self.assertEqual(t, self.TEST_TOKEN) self.assertEqual(self.TEST_TOKEN, t)
OAUTH_REQUEST_BODY = { OAUTH_REQUEST_BODY = {
"auth": { "auth": {
@@ -286,9 +286,6 @@ class AuthenticateWithOAuthTests(TokenTests):
class TestOAuthLibModule(utils.TestCase): class TestOAuthLibModule(utils.TestCase):
def setUp(self):
super(TestOAuthLibModule, self).setUp()
def test_no_oauthlib_installed(self): def test_no_oauthlib_installed(self):
with mock.patch.object(auth, 'oauth1', None): with mock.patch.object(auth, 'oauth1', None):
self.assertRaises(NotImplementedError, self.assertRaises(NotImplementedError,

View File

@@ -53,6 +53,3 @@ class OAuthMethod(v3.AuthMethod):
class OAuth(v3._AuthConstructor): class OAuth(v3._AuthConstructor):
_auth_method_class = OAuthMethod _auth_method_class = OAuthMethod
def __init__(self, auth_url, **kwargs):
super(OAuth, self).__init__(auth_url, **kwargs)