Just "import mock" as it works for Python 2 and 3

Don't try to special case "import mock" depending if Python 3 vs Python
2. It works to just use "import mock" no matter which version.

Change-Id: I35c67cb86559c0557a757c6a7664c3f56961dfe5
This commit is contained in:
John L. Villalovos 2017-10-13 10:27:05 -07:00
parent 4cecee4bbb
commit 660b682764
2 changed files with 2 additions and 9 deletions

View File

@ -14,10 +14,7 @@
# Mostly copied from ironic/tests/test_swift.py
try:
from unittest import mock
except ImportError:
import mock
import mock
from swiftclient import client as swift_client
from swiftclient import exceptions as swift_exception

View File

@ -12,6 +12,7 @@
# limitations under the License.
from keystonemiddleware import auth_token
import mock
from oslo_config import cfg
from ironic_inspector import node_cache
@ -19,11 +20,6 @@ from ironic_inspector.test import base
from ironic_inspector import utils
from ironicclient.v1 import node
try:
from unittest import mock
except ImportError:
import mock
CONF = cfg.CONF