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: I24c8926bc7a571b45af77c497f0791d101ebbc12
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
Sean McGinnis 2020-04-18 11:56:56 -05:00
parent e486ee0faf
commit c995a87873
No known key found for this signature in database
GPG Key ID: CE7EE4BFAF8D70C8
32 changed files with 46 additions and 32 deletions

View File

@ -14,7 +14,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from oslotest import base
from oslotest import mock_fixture
from six.moves import builtins

View File

@ -16,8 +16,8 @@
import os
import textwrap
from unittest import mock
import mock
import pycodestyle
from os_win._hacking import checks

View File

@ -14,8 +14,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from unittest import mock
import ddt
import mock
from os_win.tests.unit import test_base
from os_win.utils import processutils

View File

@ -18,8 +18,9 @@
Unit tests for the os_win._utils module.
"""
from unittest import mock
import ddt
import mock
from os_win import _utils
from os_win import constants

View File

@ -18,8 +18,8 @@ Unit tests for the Hyper-V utils factory.
"""
import inspect
from unittest import mock
import mock
from oslo_config import cfg
from oslo_utils import importutils

View File

@ -14,9 +14,9 @@
# under the License.
import ctypes
from unittest import mock
import ddt
import mock
from os_win import constants
from os_win import exceptions

View File

@ -14,9 +14,9 @@
# under the License.
import ctypes
from unittest import mock
import ddt
import mock
from six.moves import queue
from os_win import constants

View File

@ -14,9 +14,9 @@
# under the License.
import platform
from unittest import mock
import ddt
import mock
from os_win import exceptions
from os_win.tests.unit import test_base

View File

@ -13,8 +13,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from unittest import mock
import ddt
import mock
from os_win import constants
from os_win import exceptions

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from os_win.tests.unit import test_base
from os_win.utils.compute import rdpconsoleutils

View File

@ -13,8 +13,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from unittest import mock
import ddt
import mock
from six.moves import range # noqa
from os_win import constants

View File

@ -12,8 +12,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from unittest import mock
import ddt
import mock
import six
from os_win import constants

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from os_win import constants
from os_win import exceptions

View File

@ -13,8 +13,9 @@
# License for the specific language governing permissions and limitations
# under the License.import mock
from unittest import mock
import ddt
import mock
import six
from os_win import constants

View File

@ -14,8 +14,8 @@
# under the License.
import errno
from unittest import mock
import mock
from six.moves import builtins
from os_win import constants

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from os_win import exceptions
from os_win.tests.unit import test_base

View File

@ -12,8 +12,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from unittest import mock
import ddt
import mock
from oslo_utils import units
from os_win import constants

View File

@ -17,7 +17,7 @@
Unit tests for the Hyper-V NVGRE support.
"""
import mock
from unittest import mock
from os_win import constants
from os_win import exceptions

View File

@ -14,8 +14,8 @@
# under the License.
import ctypes
from unittest import mock
import mock
import six
from os_win import _utils

View File

@ -16,9 +16,9 @@
import collections
import ctypes
from unittest import mock
import ddt
import mock
import six
from os_win import _utils

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from os_win import constants
from os_win import exceptions

View File

@ -13,8 +13,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from unittest import mock
import ddt
import mock
from os_win import _utils
from os_win import constants

View File

@ -13,8 +13,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from unittest import mock
import ddt
import mock
from os_win import exceptions
from os_win.tests.unit import test_base

View File

@ -14,9 +14,9 @@
import ctypes
import os
from unittest import mock
import ddt
import mock
import six
from os_win import constants

View File

@ -13,8 +13,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from unittest import mock
import ddt
import mock
from os_win.tests.unit import test_base
from os_win.utils import _acl_utils

View File

@ -12,7 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
import six
import imp

View File

@ -12,7 +12,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from os_win import constants
from os_win import exceptions

View File

@ -14,8 +14,8 @@
# under the License.
import re
from unittest import mock
import mock
from os_win import exceptions
from os_win.tests.unit import test_base

View File

@ -12,8 +12,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from unittest import mock
import ddt
import mock
from os_win import constants
from os_win import exceptions

View File

@ -15,9 +15,9 @@
import ctypes
import os
import shutil
from unittest import mock
import ddt
import mock
from os_win import constants
from os_win import exceptions

View File

@ -14,8 +14,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from unittest import mock
import ddt
import mock
from os_win import _utils
from os_win import exceptions

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from os_win import exceptions
from os_win.tests.unit import test_base