#NEWLINE# def test_resize( self ) : #NEWLINE# #INDENT# inst = self . instance #NEWLINE# flavor_ref = utils . random_unicode ( ) #NEWLINE# inst . manager . api . _get_flavor_ref = Mock ( return_value = flavor_ref ) #NEWLINE# fake_body = { #NEWLINE# #INDENT# 'flavorRef' : flavor_ref , #NEWLINE# #UNINDENT# } #NEWLINE# inst . manager . action = Mock ( ) #NEWLINE# ret = inst . resize ( 42 ) #NEWLINE# call_uri = ( '/instances/%s/action' % inst . id ) #NEWLINE# inst . manager . action . assert_called_once_with ( inst , 'resize' , body = fake_body )