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: If3a760ea142023791d44350d4603b329b4396f6b
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
changes/91/720991/1
Sean McGinnis 2 years ago
parent 621a392d32
commit 65a95cbd18
No known key found for this signature in database
GPG Key ID: CE7EE4BFAF8D70C8
  1. 2
      masakariclient/tests/unit/osc/v1/test_host.py
  2. 2
      masakariclient/tests/unit/osc/v1/test_notification.py
  3. 3
      masakariclient/tests/unit/osc/v1/test_segment.py
  4. 2
      masakariclient/tests/unit/test_cliargs.py
  5. 2
      masakariclient/tests/unit/test_client.py
  6. 3
      masakariclient/tests/unit/test_shell.py
  7. 2
      masakariclient/tests/unit/v1/test_client.py
  8. 3
      masakariclient/tests/unit/v1/test_shell.py

@ -17,7 +17,7 @@ test_masakariclient
Tests for `masakariclient` module.
"""
import mock
from unittest import mock
import uuid
from osc_lib import utils

@ -17,7 +17,7 @@ test_masakariclient
Tests for `masakariclient` module.
"""
import mock
from unittest import mock
import uuid
from osc_lib.tests import utils as osc_lib_utils

@ -17,8 +17,9 @@ test_masakariclient
Tests for `masakariclient` module.
"""
from unittest import mock
import ddt
import mock
import uuid
from osc_lib.tests import utils as osc_lib_utils

@ -12,8 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import mock
import testtools
from unittest import mock
from masakariclient import cliargs

@ -18,7 +18,7 @@ test_masakariclient
Tests for `masakariclient` module.
"""
import mock
from unittest import mock
from masakariclient import client as mc
from masakariclient.common import utils

@ -19,7 +19,8 @@ test_shell
Tests for `masakariclient` module.
"""
import logging
import mock
from unittest import mock
import six
import sys
import testtools

@ -17,7 +17,7 @@ test_masakariclient
Tests for `masakariclient` module.
"""
import mock
from unittest import mock
from keystoneauth1.identity.generic import password as ks_password
from keystoneauth1 import session as ks_session

@ -18,8 +18,9 @@ test_masakariclient
Tests for `masakariclient` module.
"""
from unittest import mock
import ddt
import mock
import six
import sys

Loading…
Cancel
Save