summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2020-06-09 18:14:00 +0000
committerGerrit Code Review <review@openstack.org>2020-06-09 18:14:00 +0000
commit670fe7ce2a31f3111bc3fb80dd80a43500daab87 (patch)
tree73560159fe538c9b85a7712bcfabfdbfc8e35741
parent3fa304428c8837174d045bb271a397346e66a3d8 (diff)
parent8a9566864f678913bdcfcdfc7aac0e04e98d78b7 (diff)
downloadpython-heatclient-670fe7ce2a31f3111bc3fb80dd80a43500daab87.tar.gz
Merge "Use unittest.mock instead of third party mock"2.2.0
-rw-r--r--heatclient/tests/unit/osc/utils.py4
-rw-r--r--heatclient/tests/unit/osc/v1/fakes.py2
-rw-r--r--heatclient/tests/unit/osc/v1/test_build_info.py2
-rw-r--r--heatclient/tests/unit/osc/v1/test_event.py2
-rw-r--r--heatclient/tests/unit/osc/v1/test_resource.py2
-rw-r--r--heatclient/tests/unit/osc/v1/test_snapshot.py5
-rw-r--r--heatclient/tests/unit/osc/v1/test_software_config.py3
-rw-r--r--heatclient/tests/unit/osc/v1/test_software_deployment.py2
-rw-r--r--heatclient/tests/unit/osc/v1/test_stack.py2
-rw-r--r--heatclient/tests/unit/osc/v1/test_stack_failures.py2
-rw-r--r--heatclient/tests/unit/osc/v1/test_template.py2
-rw-r--r--heatclient/tests/unit/test_build_info.py3
-rw-r--r--heatclient/tests/unit/test_common_http.py2
-rw-r--r--heatclient/tests/unit/test_deployment_utils.py3
-rw-r--r--heatclient/tests/unit/test_environment_format.py3
-rw-r--r--heatclient/tests/unit/test_event_utils.py3
-rw-r--r--heatclient/tests/unit/test_events.py3
-rw-r--r--heatclient/tests/unit/test_resource_types.py3
-rw-r--r--heatclient/tests/unit/test_resources.py3
-rw-r--r--heatclient/tests/unit/test_shell.py2
-rw-r--r--heatclient/tests/unit/test_software_configs.py3
-rw-r--r--heatclient/tests/unit/test_software_deployments.py3
-rw-r--r--heatclient/tests/unit/test_stacks.py3
-rw-r--r--heatclient/tests/unit/test_template_format.py3
-rw-r--r--heatclient/tests/unit/test_template_utils.py2
-rw-r--r--heatclient/tests/unit/test_utils.py2
-rw-r--r--heatclient/tests/unit/v1/test_hooks.py3
-rw-r--r--lower-constraints.txt1
-rw-r--r--test-requirements.txt1
29 files changed, 43 insertions, 31 deletions
diff --git a/heatclient/tests/unit/osc/utils.py b/heatclient/tests/unit/osc/utils.py
index e2ed52e..3ef07a5 100644
--- a/heatclient/tests/unit/osc/utils.py
+++ b/heatclient/tests/unit/osc/utils.py
@@ -15,10 +15,10 @@
#
import os
+import sys
+from unittest import mock
import fixtures
-import mock
-import sys
import testtools
from heatclient.tests.unit.osc import fakes
diff --git a/heatclient/tests/unit/osc/v1/fakes.py b/heatclient/tests/unit/osc/v1/fakes.py
index 87525bb..dec0c6a 100644
--- a/heatclient/tests/unit/osc/v1/fakes.py
+++ b/heatclient/tests/unit/osc/v1/fakes.py
@@ -13,7 +13,7 @@
# under the License.
#
-import mock
+from unittest import mock
from heatclient.tests.unit.osc import utils
diff --git a/heatclient/tests/unit/osc/v1/test_build_info.py b/heatclient/tests/unit/osc/v1/test_build_info.py
index c17a42f..40893d2 100644
--- a/heatclient/tests/unit/osc/v1/test_build_info.py
+++ b/heatclient/tests/unit/osc/v1/test_build_info.py
@@ -11,7 +11,7 @@
# under the License.
#
-import mock
+from unittest import mock
from heatclient.osc.v1 import build_info as osc_build_info
from heatclient.tests.unit.osc.v1 import fakes as orchestration_fakes
diff --git a/heatclient/tests/unit/osc/v1/test_event.py b/heatclient/tests/unit/osc/v1/test_event.py
index d7ecb60..5edaf20 100644
--- a/heatclient/tests/unit/osc/v1/test_event.py
+++ b/heatclient/tests/unit/osc/v1/test_event.py
@@ -13,8 +13,8 @@
# Copyright 2015 IBM Corp.
import copy
+from unittest import mock
-import mock
import testscenarios
from heatclient import exc
diff --git a/heatclient/tests/unit/osc/v1/test_resource.py b/heatclient/tests/unit/osc/v1/test_resource.py
index 817638c..b932f7e 100644
--- a/heatclient/tests/unit/osc/v1/test_resource.py
+++ b/heatclient/tests/unit/osc/v1/test_resource.py
@@ -12,8 +12,8 @@
#
import copy
+from unittest import mock
-import mock
from osc_lib import exceptions as exc
from heatclient import exc as heat_exc
diff --git a/heatclient/tests/unit/osc/v1/test_snapshot.py b/heatclient/tests/unit/osc/v1/test_snapshot.py
index 7f69c61..1b99942 100644
--- a/heatclient/tests/unit/osc/v1/test_snapshot.py
+++ b/heatclient/tests/unit/osc/v1/test_snapshot.py
@@ -9,8 +9,9 @@
# 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
+
+from unittest import mock
+
from osc_lib import exceptions as exc
import six
diff --git a/heatclient/tests/unit/osc/v1/test_software_config.py b/heatclient/tests/unit/osc/v1/test_software_config.py
index 685a0a9..470de12 100644
--- a/heatclient/tests/unit/osc/v1/test_software_config.py
+++ b/heatclient/tests/unit/osc/v1/test_software_config.py
@@ -11,7 +11,8 @@
# under the License.
#
-import mock
+from unittest import mock
+
from osc_lib import exceptions as exc
import yaml
diff --git a/heatclient/tests/unit/osc/v1/test_software_deployment.py b/heatclient/tests/unit/osc/v1/test_software_deployment.py
index 96ec84c..9edb6a9 100644
--- a/heatclient/tests/unit/osc/v1/test_software_deployment.py
+++ b/heatclient/tests/unit/osc/v1/test_software_deployment.py
@@ -12,8 +12,8 @@
#
import copy
+from unittest import mock
-import mock
from osc_lib import exceptions as exc
from heatclient import exc as heat_exc
diff --git a/heatclient/tests/unit/osc/v1/test_stack.py b/heatclient/tests/unit/osc/v1/test_stack.py
index d6a51b0..7af48ff 100644
--- a/heatclient/tests/unit/osc/v1/test_stack.py
+++ b/heatclient/tests/unit/osc/v1/test_stack.py
@@ -13,8 +13,8 @@
import copy
import io
+from unittest import mock
-import mock
from osc_lib import exceptions as exc
from osc_lib import utils
import six
diff --git a/heatclient/tests/unit/osc/v1/test_stack_failures.py b/heatclient/tests/unit/osc/v1/test_stack_failures.py
index 1ecfbf5..9cb5650 100644
--- a/heatclient/tests/unit/osc/v1/test_stack_failures.py
+++ b/heatclient/tests/unit/osc/v1/test_stack_failures.py
@@ -14,7 +14,7 @@
import collections
-import mock
+from unittest import mock
from heatclient import exc
from heatclient.osc.v1 import stack_failures
diff --git a/heatclient/tests/unit/osc/v1/test_template.py b/heatclient/tests/unit/osc/v1/test_template.py
index 3a85c99..0694510 100644
--- a/heatclient/tests/unit/osc/v1/test_template.py
+++ b/heatclient/tests/unit/osc/v1/test_template.py
@@ -12,7 +12,7 @@
#
# Copyright 2015 IBM Corp.
-import mock
+from unittest import mock
from heatclient import exc
from heatclient.osc.v1 import template
diff --git a/heatclient/tests/unit/test_build_info.py b/heatclient/tests/unit/test_build_info.py
index bc08f3b..99330e0 100644
--- a/heatclient/tests/unit/test_build_info.py
+++ b/heatclient/tests/unit/test_build_info.py
@@ -13,7 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-import mock
+from unittest import mock
+
from oslo_serialization import jsonutils
import testtools
diff --git a/heatclient/tests/unit/test_common_http.py b/heatclient/tests/unit/test_common_http.py
index 17afa38..1d32ba1 100644
--- a/heatclient/tests/unit/test_common_http.py
+++ b/heatclient/tests/unit/test_common_http.py
@@ -13,9 +13,9 @@
# limitations under the License.
import socket
+from unittest import mock
from keystoneauth1 import adapter
-import mock
from oslo_serialization import jsonutils
import six
import testtools
diff --git a/heatclient/tests/unit/test_deployment_utils.py b/heatclient/tests/unit/test_deployment_utils.py
index 1167a76..4a5dc13 100644
--- a/heatclient/tests/unit/test_deployment_utils.py
+++ b/heatclient/tests/unit/test_deployment_utils.py
@@ -11,7 +11,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-import mock
+from unittest import mock
+
import six
import swiftclient.client
import testscenarios
diff --git a/heatclient/tests/unit/test_environment_format.py b/heatclient/tests/unit/test_environment_format.py
index 905c910..e2a86a8 100644
--- a/heatclient/tests/unit/test_environment_format.py
+++ b/heatclient/tests/unit/test_environment_format.py
@@ -10,7 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-import mock
+from unittest import mock
+
import six
import testscenarios
import testtools
diff --git a/heatclient/tests/unit/test_event_utils.py b/heatclient/tests/unit/test_event_utils.py
index b080e00..bcc8dba 100644
--- a/heatclient/tests/unit/test_event_utils.py
+++ b/heatclient/tests/unit/test_event_utils.py
@@ -10,7 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-import mock
+from unittest import mock
+
import testtools
from heatclient.common import event_utils
diff --git a/heatclient/tests/unit/test_events.py b/heatclient/tests/unit/test_events.py
index b63aebe..ebae327 100644
--- a/heatclient/tests/unit/test_events.py
+++ b/heatclient/tests/unit/test_events.py
@@ -12,7 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-import mock
+from unittest import mock
+
import testtools
from heatclient.common import utils
diff --git a/heatclient/tests/unit/test_resource_types.py b/heatclient/tests/unit/test_resource_types.py
index e31af8e..92d1c49 100644
--- a/heatclient/tests/unit/test_resource_types.py
+++ b/heatclient/tests/unit/test_resource_types.py
@@ -11,7 +11,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-import mock
+from unittest import mock
+
import testtools
from heatclient.common import utils
diff --git a/heatclient/tests/unit/test_resources.py b/heatclient/tests/unit/test_resources.py
index 8676b8c..65285e9 100644
--- a/heatclient/tests/unit/test_resources.py
+++ b/heatclient/tests/unit/test_resources.py
@@ -12,7 +12,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-import mock
+from unittest import mock
+
from six.moves.urllib import parse
import testtools
diff --git a/heatclient/tests/unit/test_shell.py b/heatclient/tests/unit/test_shell.py
index 0c8b272..c29a3a2 100644
--- a/heatclient/tests/unit/test_shell.py
+++ b/heatclient/tests/unit/test_shell.py
@@ -14,11 +14,11 @@
import os
import sys
import tempfile
+from unittest import mock
import uuid
import fixtures
from keystoneauth1 import fixture as keystone_fixture
-import mock
from oslo_serialization import jsonutils
from oslo_utils import encodeutils
from requests_mock.contrib import fixture as rm_fixture
diff --git a/heatclient/tests/unit/test_software_configs.py b/heatclient/tests/unit/test_software_configs.py
index 5adcad6..e55bb40 100644
--- a/heatclient/tests/unit/test_software_configs.py
+++ b/heatclient/tests/unit/test_software_configs.py
@@ -10,7 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-import mock
+from unittest import mock
+
import testtools
from heatclient.common import utils
diff --git a/heatclient/tests/unit/test_software_deployments.py b/heatclient/tests/unit/test_software_deployments.py
index 47a446d..046fb2c 100644
--- a/heatclient/tests/unit/test_software_deployments.py
+++ b/heatclient/tests/unit/test_software_deployments.py
@@ -10,7 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-import mock
+from unittest import mock
+
import testtools
from heatclient.common import utils
diff --git a/heatclient/tests/unit/test_stacks.py b/heatclient/tests/unit/test_stacks.py
index 443015a..d1c6a1c 100644
--- a/heatclient/tests/unit/test_stacks.py
+++ b/heatclient/tests/unit/test_stacks.py
@@ -10,7 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-import mock
+from unittest import mock
+
import testscenarios
from testscenarios import scenarios as scnrs
import testtools
diff --git a/heatclient/tests/unit/test_template_format.py b/heatclient/tests/unit/test_template_format.py
index ffc1ec4..ab2aa1a 100644
--- a/heatclient/tests/unit/test_template_format.py
+++ b/heatclient/tests/unit/test_template_format.py
@@ -10,7 +10,8 @@
# License for the specific language governing permissions and limitations
# under the License.
-import mock
+from unittest import mock
+
import six
import testscenarios
import testtools
diff --git a/heatclient/tests/unit/test_template_utils.py b/heatclient/tests/unit/test_template_utils.py
index 082283a..a13d7ae 100644
--- a/heatclient/tests/unit/test_template_utils.py
+++ b/heatclient/tests/unit/test_template_utils.py
@@ -13,8 +13,8 @@
import json
import tempfile
+from unittest import mock
-import mock
from oslo_serialization import base64
import six
from six.moves.urllib import error
diff --git a/heatclient/tests/unit/test_utils.py b/heatclient/tests/unit/test_utils.py
index 0cb1462..9c01f49 100644
--- a/heatclient/tests/unit/test_utils.py
+++ b/heatclient/tests/unit/test_utils.py
@@ -14,8 +14,8 @@
# under the License.
import os
+from unittest import mock
-import mock
import testtools
from heatclient.common import utils
diff --git a/heatclient/tests/unit/v1/test_hooks.py b/heatclient/tests/unit/v1/test_hooks.py
index 65abc03..90cef7c 100644
--- a/heatclient/tests/unit/v1/test_hooks.py
+++ b/heatclient/tests/unit/v1/test_hooks.py
@@ -11,7 +11,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-import mock
+from unittest import mock
+
import testtools
from heatclient.common import hook_utils
diff --git a/lower-constraints.txt b/lower-constraints.txt
index f78f7b7..a0f0b9d 100644
--- a/lower-constraints.txt
+++ b/lower-constraints.txt
@@ -31,7 +31,6 @@ keystoneauth1==3.4.0
linecache2==1.0.0
MarkupSafe==1.0
mccabe==0.2.1
-mock==2.0.0
monotonic==0.6
msgpack-python==0.4.0
munch==2.1.0
diff --git a/test-requirements.txt b/test-requirements.txt
index 7368b76..7150d62 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -7,7 +7,6 @@ hacking>=3.0.1,<3.1.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0
fixtures>=3.0.0 # Apache-2.0/BSD
requests-mock>=1.2.0 # Apache-2.0
-mock>=2.0.0 # BSD
python-openstackclient>=3.12.0 # Apache-2.0
stestr>=2.0.0 # Apache-2.0
tempest>=17.1.0 # Apache-2.0