#NEWLINE# @ mock . patch ( 'shade.OpenStackCloud.get_volume' ) #NEWLINE# @ mock . patch ( 'shade.OpenStackCloud.nova_client' ) #NEWLINE# def test_delete_server_no_cinder( self , nova_mock , cinder_mock ) : #NEWLINE# #INDENT# '\n        Test that novaclient server delete is called when wait=False\n        ' #NEWLINE# server = fakes . FakeServer ( '1234' , 'porky' , 'ACTIVE' ) #NEWLINE# nova_mock . servers . list . return_value = [ server ] #NEWLINE# with mock . patch ( 'shade.OpenStackCloud.has_service' , return_value = False ) : #NEWLINE# #INDENT# self . assertTrue ( self . cloud . delete_server ( 'porky' , wait = False ) ) #NEWLINE# nova_mock . servers . delete . assert_called_with ( server = server . id ) #NEWLINE# self . assertFalse ( cinder_mock . called )