[train-only] Fix mock import for infinidat driver

Infinidat wrongfully imports mock but it should be imported from
unittest. This was fixed during the Ussuri cycle via the mammoth commit
[1].

I'm not sure we want to backport this whole commit down to train but we
certainly want to fix this bug.

[1] https://review.opendev.org/c/openstack/cinder/+/700253

Change-Id: I6f5443417b7b07c648b81fddcda430496078573c
This commit is contained in:
David Vallee Delisle 2021-05-12 08:49:48 -04:00
parent daa211e28e
commit 574221a9bc
1 changed files with 5 additions and 4 deletions

View File

@ -12,16 +12,17 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
"""
INFINIDAT InfiniBox Volume Driver
"""
""" INFINIDAT InfiniBox Volume Driver."""
from contextlib import contextmanager
import functools
import platform
import socket
try:
from unittest import mock
except ImportError:
import mock
import mock
from oslo_config import cfg
from oslo_log import log as logging
from oslo_utils import units