@mock.patch.object(helpers.OpenStackHelper, "delete_server_volumes_link")
    @mock.patch.object(storage_link_api.Controller, "_get_attachment_from_id")
    def test_delete(self, mock_get, mock_delete):
        server_id = uuid.uuid4().hex
        vol_id = uuid.uuid4().hex
        link_id = "%s_%s" % (server_id, vol_id)
        mock_get.return_value = {"serverId": server_id, "volumeId": vol_id}
        mock_delete.return_value = []
        ret = self.controller.delete(None, link_id)
        self.assertEqual([], ret)
        mock_delete.assert_called_with(None, server_id, vol_id)
        mock_get.assert_called_with(None, link_id)
dataset/ETHPy150Open openstack/ooi/ooi/tests/controllers/test_storage_links.py/TestStorageLinkController.test_delete/original