Use unittest.mock instead of third party mock
Now that we no longer support py27, we can use the standard library unittest.mock module instead of the third party mock lib. Change-Id: I805f5a4a901e410492c543c1857943ffd744ea35 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
parent
232f4e81ee
commit
93e7bb8747
@ -13,7 +13,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslotest import base as test_base
|
||||
|
||||
from ironicclient.common.apiclient import base
|
||||
|
@ -14,8 +14,8 @@
|
||||
# under the License.
|
||||
|
||||
import copy
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
import testtools
|
||||
|
||||
from ironicclient.common import base
|
||||
|
@ -11,9 +11,9 @@
|
||||
# under the License.
|
||||
|
||||
import os
|
||||
from unittest import mock
|
||||
|
||||
import dogpile.cache
|
||||
import mock
|
||||
|
||||
from ironicclient.common import filecache
|
||||
from ironicclient.tests.unit import utils
|
||||
|
@ -15,9 +15,9 @@
|
||||
|
||||
from http import client as http_client
|
||||
import time
|
||||
from unittest import mock
|
||||
|
||||
from keystoneauth1 import exceptions as kexc
|
||||
import mock
|
||||
from oslo_serialization import jsonutils
|
||||
|
||||
from ironicclient.common import filecache
|
||||
|
@ -19,8 +19,8 @@ import os
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
|
||||
from ironicclient.common import utils
|
||||
from ironicclient import exc
|
||||
|
@ -11,8 +11,8 @@
|
||||
# under the License.
|
||||
|
||||
import argparse
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
import testtools
|
||||
|
||||
from ironicclient.osc import plugin
|
||||
|
@ -15,8 +15,8 @@
|
||||
#
|
||||
|
||||
import json
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from osc_lib.tests import utils
|
||||
|
||||
from ironicclient.tests.unit.osc import fakes
|
||||
|
@ -12,8 +12,8 @@
|
||||
#
|
||||
|
||||
import copy
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from osc_lib.tests import utils as osctestutils
|
||||
|
||||
from ironicclient import exc
|
||||
|
@ -15,8 +15,8 @@
|
||||
#
|
||||
|
||||
import copy
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from osc_lib.tests import utils as oscutils
|
||||
|
||||
from ironicclient import exc
|
||||
|
@ -11,7 +11,8 @@
|
||||
# under the License.
|
||||
#
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from osc_lib.tests import utils as oscutils
|
||||
|
||||
from ironicclient.osc.v1 import baremetal_create
|
||||
|
@ -13,8 +13,8 @@
|
||||
|
||||
import copy
|
||||
import json
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from osc_lib.tests import utils as osctestutils
|
||||
|
||||
from ironicclient import exc
|
||||
|
@ -15,8 +15,8 @@
|
||||
#
|
||||
|
||||
import copy
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from osc_lib.tests import utils as oscutils
|
||||
|
||||
from ironicclient.common import utils as commonutils
|
||||
|
@ -15,8 +15,8 @@
|
||||
#
|
||||
|
||||
import copy
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from osc_lib.tests import utils as osctestutils
|
||||
from osc_lib import utils as oscutils
|
||||
|
||||
|
@ -15,8 +15,8 @@
|
||||
#
|
||||
|
||||
import copy
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from osc_lib.tests import utils as osctestutils
|
||||
|
||||
from ironicclient.osc.v1 import baremetal_portgroup
|
||||
|
@ -13,8 +13,8 @@
|
||||
# under the License.
|
||||
|
||||
import copy
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from osc_lib.tests import utils as osctestutils
|
||||
|
||||
from ironicclient import exc
|
||||
|
@ -13,8 +13,8 @@
|
||||
# under the License.
|
||||
|
||||
import copy
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from osc_lib.tests import utils as osctestutils
|
||||
|
||||
from ironicclient import exc
|
||||
|
@ -10,7 +10,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from openstack import config
|
||||
|
||||
from ironicclient import client as iroclient
|
||||
|
@ -14,8 +14,8 @@
|
||||
# under the License.
|
||||
|
||||
from http import client as http_client
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
|
||||
from ironicclient.common.apiclient import exceptions
|
||||
from ironicclient import exc
|
||||
|
@ -16,9 +16,9 @@
|
||||
import copy
|
||||
import io
|
||||
import os
|
||||
from unittest import mock
|
||||
|
||||
import fixtures
|
||||
import mock
|
||||
from oslo_utils import strutils
|
||||
import requests
|
||||
import testtools
|
||||
|
@ -11,8 +11,8 @@
|
||||
# under the License.
|
||||
|
||||
import copy
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
import testtools
|
||||
|
||||
from ironicclient import exc
|
||||
|
@ -10,7 +10,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from ironicclient.common import filecache
|
||||
from ironicclient.common import http
|
||||
|
@ -11,9 +11,9 @@
|
||||
# under the License.
|
||||
|
||||
import builtins
|
||||
from unittest import mock
|
||||
|
||||
import jsonschema
|
||||
import mock
|
||||
|
||||
from ironicclient import exc
|
||||
from ironicclient.tests.unit import utils
|
||||
|
@ -13,7 +13,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
import testtools
|
||||
from testtools import matchers
|
||||
|
||||
|
@ -15,8 +15,8 @@
|
||||
import copy
|
||||
import tempfile
|
||||
import time
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
import testtools
|
||||
from testtools.matchers import HasLength
|
||||
|
||||
|
@ -7,7 +7,6 @@ doc8>=0.6.0 # Apache-2.0
|
||||
flake8-import-order>=0.17.1 # LGPLv3
|
||||
fixtures>=3.0.0 # Apache-2.0/BSD
|
||||
requests-mock>=1.2.0 # Apache-2.0
|
||||
mock>=2.0.0 # BSD
|
||||
Babel!=2.4.0,>=2.3.4 # BSD
|
||||
oslotest>=3.2.0 # Apache-2.0
|
||||
testtools>=2.2.0 # MIT
|
||||
|
Loading…
Reference in New Issue
Block a user