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:
parent
e486ee0faf
commit
c995a87873
|
@ -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
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
|
||||
import os
|
||||
import textwrap
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
import pycodestyle
|
||||
|
||||
from os_win._hacking import checks
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -14,8 +14,8 @@
|
|||
# under the License.
|
||||
|
||||
import ctypes
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
import six
|
||||
|
||||
from os_win import _utils
|
||||
|
|
|
@ -16,9 +16,9 @@
|
|||
|
||||
import collections
|
||||
import ctypes
|
||||
from unittest import mock
|
||||
|
||||
import ddt
|
||||
import mock
|
||||
import six
|
||||
|
||||
from os_win import _utils
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -14,9 +14,9 @@
|
|||
|
||||
import ctypes
|
||||
import os
|
||||
from unittest import mock
|
||||
|
||||
import ddt
|
||||
import mock
|
||||
import six
|
||||
|
||||
from os_win import constants
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue