#NEWLINE# def setUp( self ) : #NEWLINE# #INDENT# super ( TestServerRebuild , self ) . setUp ( ) #NEWLINE# self . image = image_fakes . FakeImage . create_one_image ( ) #NEWLINE# self . cimages_mock . get . return_value = methods . image #NEWLINE# new_server = compute_fakes . FakeServer . create_one_server ( ) #NEWLINE# attrs = { #NEWLINE# #INDENT# 'id' : new_server . id , #NEWLINE# 'image' : { #NEWLINE# #INDENT# 'id' : self . image . id , #NEWLINE# #UNINDENT# } , #NEWLINE# 'networks' : { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } , #NEWLINE# 'adminPass' : 'passw0rd' , #NEWLINE# #UNINDENT# } #NEWLINE# methods = { #NEWLINE# #INDENT# 'rebuild' : new_server , #NEWLINE# #UNINDENT# } #NEWLINE# self . server = compute_fakes . FakeServer . create_one_server ( attrs = attrs , methods = methods ) #NEWLINE# self . servers_mock . get . return_value = self . server #NEWLINE# self . cmd = server . RebuildServer ( self . app , None )