#NEWLINE# @ mock . patch . object ( volumeops . VolumeOps , 'attach_volume' ) #NEWLINE# def test_attach_volumes( self , mock_attach_volume ) : #NEWLINE# #INDENT# block_device_info = get_fake_block_dev_info ( ) #NEWLINE# self . _volumeops . attach_volumes ( block_device_info , mock . sentinel . instance_name , ebs_root = True ) #NEWLINE# mock_attach_volume . assert_called_once_with ( block_device_info [ 'block_device_mapping' ] [ 0 ] [ 'connection_info' ] , mock . sentinel . instance_name , True )