#NEWLINE# def test_user_update( self ) : #NEWLINE# #INDENT# new_secret = utils . generate_password ( ) #NEWLINE# body = dict ( user = dict ( name = 'guy2' , access = 'acc2' , secret = new_secret ) ) #NEWLINE# req = webob . Request . blank ( '/v1.0/users/id2' ) #NEWLINE# req . headers [ 'Content-Type' ] = 'application/json' #NEWLINE# req . method = 'PUT' #NEWLINE# req . body = json . dumps ( body ) #NEWLINE# res = req . get_response ( fakes . wsgi_app ( ) ) #NEWLINE# res_dict = json . loads ( res . body ) #NEWLINE# self . assertEqual ( body . status_int , 200 ) #NEWLINE# self . assertEqual ( res_dict [ 'user' ] [ 'id' ] , 'id2' ) #NEWLINE# self . assertEqual ( res_dict [ 'user' ] [ 'name' ] , 'guy2' ) #NEWLINE# self . assertEqual ( res_dict [ 'user' ] [ 'access' ] , 'acc2' ) #NEWLINE# self . assertEqual ( res_dict [ 'user' ] [ 'secret' ] , new_secret ) #NEWLINE# self . assertEqual ( res_dict [ 'user' ] [ 'admin' ] , True )