#NEWLINE# def test_create( self ) : #NEWLINE# #INDENT# def stub_create_aggregate( context , name , availability_zone ) : #NEWLINE# #INDENT# self . assertEqual ( context , self . context , 'context' ) #NEWLINE# self . assertEqual ( 'test' , name , 'name' ) #NEWLINE# self . assertEqual ( 'nova1' , availability_zone , 'availability_zone' ) #NEWLINE# return AGGREGATE #NEWLINE# #UNINDENT# self . stubs . Set ( self . controller . api , 'create_aggregate' , result ) #NEWLINE# result = self . controller . create ( self . req , body = { #NEWLINE# #INDENT# 'aggregate' : { #NEWLINE# #INDENT# 'name' : 'test' , #NEWLINE# 'availability_zone' : 'nova1' , #NEWLINE# #UNINDENT# } , #NEWLINE# #UNINDENT# } ) #NEWLINE# result = _transform_aggregate_az ( result [ 'aggregate' ] ) #NEWLINE# self . _assert_agg_data ( FORMATTED_AGGREGATE , _make_agg_obj ( result ) )