Created
April 29, 2012 11:48
-
-
Save memee/2549741 to your computer and use it in GitHub Desktop.
Mock handle_oauth_redirection
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class OauthTest(TestCase): | |
from gsmcenter.oauth.handlers.facebook import OauthHandler | |
@patch('gsmcenter.oauth.handlers.facebook.OauthHandler') | |
def test_handle_oauth_authentication_error(self, MockClass): | |
""" | |
test if user is being informed when facebook response returned error | |
""" | |
data = { | |
'code': 'AQD5H5TrUYUBveCzFECkQFDDBejeJeh4LqDSpQU4nQIY8-gmE3ggp7gVZ67zsvbSr1NoEgJK3UmiDDa_Zlih-yp580idyxYEVEkaFAu'\ | |
'rGyx-8rjUK98ZKnV2EKvx6q4PFTlQS8i_sJB8Aj5-aJkvM_SEdfpuZECaprixfNisFGNLqkZftHLsLX8sdtDQL6UY4TM' | |
} | |
resp = self.client.get(reverse('oauth-authenticated', args=('facebook',)), data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment