#NEWLINE# @ mock . patch ( 'nova.volume.cinder.cinderclient' ) #NEWLINE# def test_initialize_connection_no_rollback( self , mock_cinderclient ) : #NEWLINE# #INDENT# mock_cinderclient . return_value . volumes . initialize_connection . side_effect = test . TestingException #NEWLINE# connector = { #NEWLINE# #INDENT# 'host' : 'host1' , #NEWLINE# #UNINDENT# } #NEWLINE# self . assertRaises ( test . TestingException , self . api . initialize_connection , self . ctx , 'id1' , connector ) #NEWLINE# self . assertFalse ( mock_cinderclient . return_value . volumes . terminate_connection . called )