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: I0bb826280b27bd71a77faa8b6475f2643801205b
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
Sean McGinnis 2020-04-18 12:00:19 -05:00
parent e4eb2799c6
commit 2258b777f6
No known key found for this signature in database
GPG Key ID: CE7EE4BFAF8D70C8
10 changed files with 12 additions and 10 deletions

View File

@ -14,7 +14,8 @@
# limitations under the License.
import mock
from unittest import mock
from oslo_serialization import jsonutils
from sahara.plugins import exceptions as p_exc

View File

@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import mock
from unittest import mock
from sahara_plugin_ambari.plugins.ambari import common
from sahara_plugin_ambari.tests.unit import base

View File

@ -15,8 +15,8 @@
import collections
from unittest import mock
import mock
import six
from sahara_plugin_ambari.plugins.ambari import configs

View File

@ -14,7 +14,8 @@
# limitations under the License.
from functools import wraps
import mock
from unittest import mock
from oslo_serialization import jsonutils

View File

@ -14,8 +14,8 @@
# limitations under the License.
import copy
from unittest import mock
import mock
from sahara_plugin_ambari.plugins.ambari import ha_helper as ha
from sahara_plugin_ambari.tests.unit import base

View File

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

View File

@ -14,7 +14,7 @@
# limitations under the License.
import mock
from unittest import mock
from sahara_plugin_ambari.plugins.ambari import common as p_common
from sahara_plugin_ambari.plugins.ambari import plugin

View File

@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import mock
from unittest import mock
from sahara_plugin_ambari.plugins.ambari import requests_helper
from sahara_plugin_ambari.tests.unit import base

View File

@ -14,7 +14,7 @@
# limitations under the License.
import mock
from unittest import mock
from sahara.plugins import exceptions
from sahara_plugin_ambari.plugins.ambari import common as p_common

View File

@ -9,7 +9,6 @@ bashate>=0.5.1 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0
doc8>=0.6.0 # Apache-2.0
fixtures>=3.0.0 # Apache-2.0/BSD
mock>=2.0.0 # BSD
oslotest>=3.2.0 # Apache-2.0
stestr>=1.0.0 # Apache-2.0
pylint==1.4.5 # GPLv2