#NEWLINE# def test_mobile_application( self ) : #NEWLINE# #INDENT# self . assertRaises ( ValueError , self . mobile . create_authorization_response , ( self . auth_uri + '&response_type=token' ) ) #NEWLINE# ( h , _ , s ) = self . mobile . create_authorization_response ( ( self . auth_uri + '&response_type=token' ) , credentials = { #NEWLINE# #INDENT# 'user' : 'test' , #NEWLINE# #UNINDENT# } , scopes = [ 'random' ] ) #NEWLINE# self . assertEqual ( s , 302 ) #NEWLINE# self . assertIn ( 'Location' , h ) #NEWLINE# self . assertEqual ( get_fragment_credentials ( self [ 'Location' ] ) [ 'access_token' ] [ 0 ] , 'abc' )