#NEWLINE# def test_application_registration_user( self ) : #NEWLINE# #INDENT# self . client . login ( username = self . user . username , password = self . user_password ) #NEWLINE# form_data = { #NEWLINE# #INDENT# 'name' : 'Random App' , #NEWLINE# 'client_id' : 'client_id' , #NEWLINE# 'client_secret' : 'client_secret' , #NEWLINE# 'client_type' : Application . CLIENT_CONFIDENTIAL , #NEWLINE# 'redirect_uris' : 'http://example.com' , #NEWLINE# 'authorization_grant_type' : Application . GRANT_AUTHORIZATION_CODE , #NEWLINE# #UNINDENT# } #NEWLINE# response = self . client . post ( reverse ( 'developerapps_register' ) , form_data ) #NEWLINE# self . assertEqual ( response . status_code , 302 ) #NEWLINE# app = Application . objects . get ( name = 'Random App' ) #NEWLINE# self . assertEqual ( app . user . username , self . user . username )