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: I72c472e13b4fc96aa81a1cab4a9f30c3df118107
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
Sean McGinnis 2020-04-18 11:59:31 -05:00
parent 3042a3cac8
commit 507d1c61e3
No known key found for this signature in database
GPG Key ID: CE7EE4BFAF8D70C8
19 changed files with 26 additions and 19 deletions

View File

@ -15,10 +15,11 @@
# License for the specific language governing permissions and limitations
# under the License.
from unittest import mock
from fixtures import MonkeyPatch
import json
import logging
import mock
from oslotest import base
from config_tempest.clients import ClientManager

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from config_tempest.services.aws import Ec2Service
from config_tempest.services.aws import S3Service

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from config_tempest.services.base import Service
from config_tempest.services.base import VersionedService

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from config_tempest.services.compute import ComputeService
from config_tempest.tempest_conf import TempestConf

View File

@ -14,9 +14,9 @@
# under the License.
from ssl import CertificateError
from unittest import mock
from fixtures import MonkeyPatch
import mock
from config_tempest.services import horizon
from config_tempest.tests.base import BaseConfigTempestTest

View File

@ -13,8 +13,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from unittest import mock
from fixtures import MonkeyPatch
import mock
from config_tempest.services.identity import IdentityService
from config_tempest.tempest_conf import TempestConf

View File

@ -13,8 +13,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from unittest import mock
from fixtures import MonkeyPatch
import mock
from config_tempest.services.image import ImageService
from config_tempest.tempest_conf import TempestConf

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from config_tempest.services.network import NetworkService
from config_tempest.tempest_conf import TempestConf

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from config_tempest import main
from config_tempest.services.object_storage import ObjectStorageService

View File

@ -15,7 +15,7 @@
from config_tempest.services.services import Services
from config_tempest.tests.base import BaseConfigTempestTest
import mock
from unittest import mock
class TestServices(BaseConfigTempestTest):

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from config_tempest.services import volume
from config_tempest.tempest_conf import TempestConf

View File

@ -13,8 +13,8 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
import os
from unittest import mock
from config_tempest import accounts
from config_tempest import main

View File

@ -15,8 +15,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from unittest import mock
from fixtures import MonkeyPatch
import mock
from config_tempest.clients import ClientManager
from config_tempest.clients import ProjectsClient

View File

@ -15,8 +15,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from unittest import mock
from fixtures import MonkeyPatch
import mock
from config_tempest.clients import ClientManager
from config_tempest import main as tool

View File

@ -15,8 +15,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from unittest import mock
from fixtures import MonkeyPatch
import mock
from config_tempest.tests.base import BaseConfigTempestTest

View File

@ -13,8 +13,9 @@
# License for the specific language governing permissions and limitations
# under the License.
from unittest import mock
from fixtures import MonkeyPatch
import mock
from config_tempest import constants as C
from config_tempest.flavors import Flavors

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from config_tempest import profile
from config_tempest.tests.base import BaseConfigTempestTest

View File

@ -15,7 +15,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from config_tempest import tempest_conf
from config_tempest.tests.base import BaseConfigTempestTest

View File

@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations
# under the License.
import mock
from unittest import mock
from config_tempest.tests.base import BaseConfigTempestTest
from config_tempest.users import Users