#NEWLINE# @ mock . patch . object ( vmops . volumeops . VolumeOps , 'attach_volume' ) #NEWLINE# def test_attach_root_device_volume( self , mock_attach_volume ) : #NEWLINE# #INDENT# mock_instance = fake_instance . fake_instance_obj ( self . context ) #NEWLINE# root_device_info = { #NEWLINE# #INDENT# 'type' : constants . VOLUME , #NEWLINE# 'connection_info' : mock . sentinel . CONN_INFO , #NEWLINE# 'disk_bus' : constants . CTRL_TYPE_IDE , #NEWLINE# #UNINDENT# } #NEWLINE# self . _vmops . _attach_root_device ( mock_instance . name , root_device_info ) #NEWLINE# mock_attach_volume . assert_called_once_with ( mock_instance [ 'connection_info' ] , mock_instance . name , disk_bus = root_device_info [ 'disk_bus' ] )