#NEWLINE# def test_update( self ) : #NEWLINE# #INDENT# body = { #NEWLINE# #INDENT# 'aggregate' : { #NEWLINE# #INDENT# 'name' : 'new_name' , #NEWLINE# 'availability_zone' : 'nova1' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } #NEWLINE# def stub_update_aggregate( context , aggregate , values ) : #NEWLINE# #INDENT# self . assertEqual ( context , self . context , 'context' ) #NEWLINE# self . assertEqual ( '1' , aggregate , 'aggregate' ) #NEWLINE# self . assertEqual ( body [ 'aggregate' ] , values , 'values' ) #NEWLINE# return AGGREGATE #NEWLINE# #UNINDENT# self . stubs . Set ( self . controller . api , 'update_aggregate' , stub_update_aggregate ) #NEWLINE# result = self . controller . update ( self . req , '1' , body = body ) #NEWLINE# result = _transform_aggregate_az ( result [ 'aggregate' ] ) #NEWLINE# self . _assert_agg_data ( AGGREGATE , _make_agg_obj ( result ) )