#NEWLINE# def test_update( self ) : #NEWLINE# #INDENT# 'Verify that sending a good auth mode succeeds' #NEWLINE# r = self . login ( 'popular' ) #NEWLINE# r = self . client . post ( '/api/keys/TESTDESKTOPCONSUMER' , { #NEWLINE# #INDENT# 'nick' : 'popular@example.com' , #NEWLINE# '_nonce' : util . create_nonce ( 'popular' , 'oauth_consumer_update' ) , #NEWLINE# 'oauth_consumer_update' : '' , #NEWLINE# 'app_name' : 'New App Name' , #NEWLINE# 'consumer_type' : 'web' , #NEWLINE# 'consumer_key' : 'TESTDESKTOPCONSUMER' , #NEWLINE# #UNINDENT# } ) #NEWLINE# r = self . assertRedirectsPrefix ( r , '/api/keys/TESTDESKTOPCONSUMER' ) #NEWLINE# self . assertTemplateUsed ( r , 'api/templates/key.html' ) #NEWLINE# self . assertContains ( r , 'API Key information updated' ) #NEWLINE# self . assertWellformed ( r ) #NEWLINE# self . assertContains ( r , 'New App Name' )