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: I94daf175305b5fd31380088e27ecec2083f89e59 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
parent
aaa7d38cdc
commit
8d2ac297fd
@ -12,8 +12,8 @@
|
||||
# limitations under the License.
|
||||
|
||||
import subprocess
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from oslo_concurrency import processutils
|
||||
|
||||
from ironic_lib.tests import base
|
||||
|
@ -13,7 +13,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from testtools.matchers import HasLength
|
||||
|
||||
from ironic_lib import disk_partitioner
|
||||
|
@ -18,8 +18,8 @@ import os
|
||||
import shutil
|
||||
import stat
|
||||
import tempfile
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from oslo_concurrency import processutils
|
||||
from oslo_config import cfg
|
||||
from oslo_serialization import base64
|
||||
|
@ -13,8 +13,8 @@
|
||||
|
||||
|
||||
import re
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
|
||||
from ironic_lib import exception
|
||||
|
@ -11,8 +11,8 @@
|
||||
# under the License.
|
||||
|
||||
import socket
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
import zeroconf
|
||||
|
||||
|
@ -14,8 +14,8 @@
|
||||
# under the License.
|
||||
|
||||
import types
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from oslo_utils import reflection
|
||||
|
||||
from ironic_lib import metrics as metricslib
|
||||
|
@ -14,8 +14,8 @@
|
||||
# under the License.
|
||||
|
||||
import socket
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
|
||||
from ironic_lib import metrics_statsd
|
||||
from ironic_lib.tests import base
|
||||
|
@ -17,8 +17,8 @@ import copy
|
||||
import errno
|
||||
import os
|
||||
import os.path
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from oslo_concurrency import processutils
|
||||
from oslo_config import cfg
|
||||
|
||||
|
@ -6,7 +6,6 @@ coverage!=4.4,>=4.0 # Apache-2.0
|
||||
eventlet!=0.18.3,!=0.20.1,>=0.18.2 # MIT
|
||||
flake8-import-order>=0.13 # LGPLv3
|
||||
hacking>=3.0.0,<3.1.0 # Apache-2.0
|
||||
mock>=2.0.0 # BSD
|
||||
stestr>=1.0.0 # Apache-2.0
|
||||
oslotest>=3.2.0 # Apache-2.0
|
||||
testscenarios>=0.4 # Apache-2.0/BSD
|
||||
|
Loading…
Reference in New Issue
Block a user