diff --git a/tackerclient/tests/unit/osc/base.py b/tackerclient/tests/unit/osc/base.py index 3037ed80..4e7d3d33 100644 --- a/tackerclient/tests/unit/osc/base.py +++ b/tackerclient/tests/unit/osc/base.py @@ -13,9 +13,9 @@ # License for the specific language governing permissions and limitations # under the License. -import mock from requests_mock.contrib import fixture as requests_mock_fixture import testtools +from unittest import mock from cliff import columns as cliff_columns diff --git a/tackerclient/tests/unit/osc/v1/test_vnf_package.py b/tackerclient/tests/unit/osc/v1/test_vnf_package.py index cff4a2fe..2aff1e51 100644 --- a/tackerclient/tests/unit/osc/v1/test_vnf_package.py +++ b/tackerclient/tests/unit/osc/v1/test_vnf_package.py @@ -18,9 +18,9 @@ import os import shutil import sys import tempfile +from unittest import mock import ddt -import mock import zipfile from tackerclient.common import exceptions diff --git a/tackerclient/tests/unit/osc/v1/test_vnflcm.py b/tackerclient/tests/unit/osc/v1/test_vnflcm.py index f45ab6ce..da5ea6b4 100644 --- a/tackerclient/tests/unit/osc/v1/test_vnflcm.py +++ b/tackerclient/tests/unit/osc/v1/test_vnflcm.py @@ -16,9 +16,9 @@ from io import StringIO import os import sys +from unittest import mock import ddt -import mock from oslo_utils.fixture import uuidsentinel import six diff --git a/tackerclient/tests/unit/osc/v1/vnf/test_vnf.py b/tackerclient/tests/unit/osc/v1/vnf/test_vnf.py index 599b24b0..7d8060da 100644 --- a/tackerclient/tests/unit/osc/v1/vnf/test_vnf.py +++ b/tackerclient/tests/unit/osc/v1/vnf/test_vnf.py @@ -15,8 +15,9 @@ # under the License. import ast +from unittest import mock + import fixtures -import mock import yaml from tackerclient.common import exceptions diff --git a/tackerclient/tests/unit/test_auth.py b/tackerclient/tests/unit/test_auth.py index 3dea71b9..3da14406 100644 --- a/tackerclient/tests/unit/test_auth.py +++ b/tackerclient/tests/unit/test_auth.py @@ -16,10 +16,10 @@ import copy import json +from unittest import mock import uuid from keystoneclient import exceptions as k_exceptions -import mock import requests import testtools diff --git a/tackerclient/tests/unit/test_cli10.py b/tackerclient/tests/unit/test_cli10.py index 56776ec5..0ae3f978 100644 --- a/tackerclient/tests/unit/test_cli10.py +++ b/tackerclient/tests/unit/test_cli10.py @@ -14,11 +14,11 @@ # under the License. # +from unittest import mock import urllib import contextlib import fixtures -import mock import six import six.moves.urllib.parse as urlparse import sys diff --git a/tackerclient/tests/unit/test_http.py b/tackerclient/tests/unit/test_http.py index 196eee44..9244428f 100644 --- a/tackerclient/tests/unit/test_http.py +++ b/tackerclient/tests/unit/test_http.py @@ -13,8 +13,8 @@ # License for the specific language governing permissions and limitations # under the License. -import mock import testtools +from unittest import mock from tackerclient.client import HTTPClient from tackerclient.common import exceptions diff --git a/tackerclient/tests/unit/test_shell.py b/tackerclient/tests/unit/test_shell.py index ab9bd995..f7dec351 100644 --- a/tackerclient/tests/unit/test_shell.py +++ b/tackerclient/tests/unit/test_shell.py @@ -17,12 +17,13 @@ import argparse import logging import os import re +from unittest import mock + import six import sys import fixtures from keystoneclient import session -import mock import testtools from testtools import matchers diff --git a/tackerclient/tests/unit/test_ssl.py b/tackerclient/tests/unit/test_ssl.py index b9b278bc..1ce4c7d7 100644 --- a/tackerclient/tests/unit/test_ssl.py +++ b/tackerclient/tests/unit/test_ssl.py @@ -13,9 +13,10 @@ # License for the specific language governing permissions and limitations # under the License. +from unittest import mock + import fixtures from keystoneclient import session -import mock import requests import testtools diff --git a/tackerclient/tests/unit/vm/test_cli10_vnf.py b/tackerclient/tests/unit/vm/test_cli10_vnf.py index 252ed9b6..70965733 100644 --- a/tackerclient/tests/unit/vm/test_cli10_vnf.py +++ b/tackerclient/tests/unit/vm/test_cli10_vnf.py @@ -13,8 +13,8 @@ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations # under the License. -import mock import sys +from unittest import mock from tackerclient.common import exceptions from tackerclient.common import utils diff --git a/tackerclient/tests/unit/vm/test_cli10_vnfd.py b/tackerclient/tests/unit/vm/test_cli10_vnfd.py index 491e7b35..25a26aeb 100644 --- a/tackerclient/tests/unit/vm/test_cli10_vnfd.py +++ b/tackerclient/tests/unit/vm/test_cli10_vnfd.py @@ -14,13 +14,13 @@ # License for the specific language governing permissions and limitations # under the License. -from mock import mock_open -from mock import patch import sys from tackerclient.common.exceptions import InvalidInput from tackerclient.tacker.v1_0.vnfm import vnfd from tackerclient.tests.unit import test_cli10 +from unittest.mock import mock_open +from unittest.mock import patch class CLITestV10VmVNFDJSON(test_cli10.CLITestV10Base): diff --git a/tackerclient/tests/unit/vm/test_cli10_vnffgd.py b/tackerclient/tests/unit/vm/test_cli10_vnffgd.py index 652e9b61..51ad6a89 100644 --- a/tackerclient/tests/unit/vm/test_cli10_vnffgd.py +++ b/tackerclient/tests/unit/vm/test_cli10_vnffgd.py @@ -10,12 +10,12 @@ # License for the specific language governing permissions and limitations # under the License. -from mock import mock_open -from mock import patch import sys from tackerclient.tacker.v1_0.nfvo import vnffgd from tackerclient.tests.unit import test_cli10 +from unittest.mock import mock_open +from unittest.mock import patch class CLITestV10VmVNFFGDJSON(test_cli10.CLITestV10Base): diff --git a/tackerclient/tests/unit/vm/test_vim_utils.py b/tackerclient/tests/unit/vm/test_vim_utils.py index 3f0df3f5..e88295e3 100644 --- a/tackerclient/tests/unit/vm/test_vim_utils.py +++ b/tackerclient/tests/unit/vm/test_vim_utils.py @@ -13,12 +13,11 @@ # License for the specific language governing permissions and limitations # under the License. - -from mock import sentinel import testtools from tackerclient.common import exceptions from tackerclient.tacker.v1_0.nfvo import vim_utils +from unittest.mock import sentinel class TestVIMUtils(testtools.TestCase): diff --git a/test-requirements.txt b/test-requirements.txt index 2558a1ea..9a4ff192 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -10,4 +10,3 @@ python-subunit>=1.0.0 # Apache-2.0/BSD requests-mock>=1.2.0 # Apache-2.0 stestr>=2.0.0 # Apache-2.0 testtools>=2.2.0 # MIT -mock>=2.0.0 # BSD