Skip to content
This repository has been archived by the owner on Feb 22, 2024. It is now read-only.

Commit

Permalink
reauth: migrate from flask-oauth to flask-oauthlib
Browse files Browse the repository at this point in the history
  • Loading branch information
eriktaubeneck committed Mar 10, 2014
1 parent 3175623 commit c1cb330
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion flask_social/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from importlib import import_module

from flask import current_app
from flask.ext.oauth import OAuthRemoteApp as BaseRemoteApp
from flask_oauthlib.client import OAuthRemoteApp as BaseRemoteApp
from flask.ext.security import current_user
from werkzeug.local import LocalProxy

Expand Down
28 changes: 14 additions & 14 deletions tests/functional_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ def assertIsNotNone(self, obj, msg=None):
class TwitterSocialTests(SocialTest):

@mock.patch('flask_social.providers.twitter.get_connection_values')
@mock.patch('flask_oauth.OAuthRemoteApp.handle_oauth1_response')
@mock.patch('flask_oauth.OAuthRemoteApp.authorize')
@mock.patch('flask_oauthlib.client.OAuthRemoteApp.handle_oauth1_response')
@mock.patch('flask_oauthlib.client.OAuthRemoteApp.authorize')
def test_connect_twitter(self,
mock_authorize,
mock_handle_oauth1_response,
Expand All @@ -119,8 +119,8 @@ def test_connect_twitter(self,
self.assertIn('Connection established to Twitter', r.data)

@mock.patch('flask_social.providers.twitter.get_connection_values')
@mock.patch('flask_oauth.OAuthRemoteApp.handle_oauth1_response')
@mock.patch('flask_oauth.OAuthRemoteApp.authorize')
@mock.patch('flask_oauthlib.client.OAuthRemoteApp.handle_oauth1_response')
@mock.patch('flask_oauthlib.client.OAuthRemoteApp.authorize')
def test_double_connect_twitter(self,
mock_authorize,
mock_handle_oauth1_response,
Expand All @@ -138,8 +138,8 @@ def test_double_connect_twitter(self,

@mock.patch('flask_social.providers.twitter.get_connection_values')
@mock.patch('flask_social.providers.twitter.get_token_pair_from_response')
@mock.patch('flask_oauth.OAuthRemoteApp.handle_oauth1_response')
@mock.patch('flask_oauth.OAuthRemoteApp.authorize')
@mock.patch('flask_oauthlib.client.OAuthRemoteApp.handle_oauth1_response')
@mock.patch('flask_oauthlib.client.OAuthRemoteApp.authorize')
def test_unconnected_twitter_login(self,
mock_authorize,
mock_handle_oauth1_response,
Expand All @@ -157,8 +157,8 @@ def test_unconnected_twitter_login(self,
@mock.patch('flask_social.providers.twitter.get_api')
@mock.patch('flask_social.providers.twitter.get_connection_values')
@mock.patch('flask_social.providers.twitter.get_token_pair_from_response')
@mock.patch('flask_oauth.OAuthRemoteApp.handle_oauth1_response')
@mock.patch('flask_oauth.OAuthRemoteApp.authorize')
@mock.patch('flask_oauthlib.client.OAuthRemoteApp.handle_oauth1_response')
@mock.patch('flask_oauthlib.client.OAuthRemoteApp.authorize')
def test_connected_twitter_login(self,
mock_authorize,
mock_handle_oauth1_response,
Expand All @@ -183,8 +183,8 @@ def test_connected_twitter_login(self,
@mock.patch('flask_social.providers.twitter.get_api')
@mock.patch('flask_social.providers.twitter.get_connection_values')
@mock.patch('flask_social.providers.twitter.get_token_pair_from_response')
@mock.patch('flask_oauth.OAuthRemoteApp.handle_oauth1_response')
@mock.patch('flask_oauth.OAuthRemoteApp.authorize')
@mock.patch('flask_oauthlib.client.OAuthRemoteApp.handle_oauth1_response')
@mock.patch('flask_oauthlib.client.OAuthRemoteApp.authorize')
def test_connected_twitter_login_update_token(self,
mock_authorize,
mock_handle_oauth1_response,
Expand Down Expand Up @@ -222,8 +222,8 @@ def test_connected_twitter_login_update_token(self,
@mock.patch('flask_social.providers.twitter.get_api')
@mock.patch('flask_social.providers.twitter.get_connection_values')
@mock.patch('flask_social.providers.twitter.get_token_pair_from_response')
@mock.patch('flask_oauth.OAuthRemoteApp.handle_oauth1_response')
@mock.patch('flask_oauth.OAuthRemoteApp.authorize')
@mock.patch('flask_oauthlib.client.OAuthRemoteApp.handle_oauth1_response')
@mock.patch('flask_oauthlib.client.OAuthRemoteApp.authorize')
def test_reconnect_twitter_token(self,
mock_authorize,
mock_handle_oauth1_response,
Expand Down Expand Up @@ -258,8 +258,8 @@ def test_reconnect_twitter_token(self,
get_mock_twitter_updated_token_pair()['secret'])

@mock.patch('flask_social.providers.twitter.get_connection_values')
@mock.patch('flask_oauth.OAuthRemoteApp.handle_oauth1_response')
@mock.patch('flask_oauth.OAuthRemoteApp.authorize')
@mock.patch('flask_oauthlib.client.OAuthRemoteApp.handle_oauth1_response')
@mock.patch('flask_oauthlib.client.OAuthRemoteApp.authorize')
def test_remove_connection(self,
mock_authorize,
mock_handle_oauth1_response,
Expand Down

0 comments on commit c1cb330

Please sign in to comment.