#NEWLINE# def prepare_data( self ) : #NEWLINE# #INDENT# self . create_server ( ) #NEWLINE# oauth_client = Client ( name = 'ios' , client_id = 'code-client' , client_secret = 'code-secret' , _redirect_uris = 'http://localhost/authorized' ) #NEWLINE# db . session . add ( User ( username = 'foo' ) ) #NEWLINE# db . session . add ( oauth_client ) #NEWLINE# db . session . commit ( ) #NEWLINE# self . oauth_client = oauth_client #NEWLINE# self . authorize_url = ( '/oauth/authorize?response_type=code&client_id=%s' % self . client_id )