#NEWLINE# def test_mgr_update_snapshot( self ) : #NEWLINE# #INDENT# clt = self . client #NEWLINE# snap = self . snapshot #NEWLINE# mgr = clt . _snapshot_manager #NEWLINE# mgr . api . method_put = Mock ( return_value = ( None , None ) ) #NEWLINE# name = utils . random_unicode ( ) #NEWLINE# desc = utils . random_unicode ( ) #NEWLINE# exp_uri = ( '/%s/%s' % ( mgr . uri_base , snap . id ) ) #NEWLINE# exp_body = { #NEWLINE# #INDENT# 'snapshot' : { #NEWLINE# #INDENT# 'display_name' : name , #NEWLINE# 'display_description' : desc , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# mgr . update ( snap , display_name = desc , display_description = desc ) #NEWLINE# mgr . api . method_put . assert_called_once_with ( exp_uri , body = exp_body )