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:
parent
3042a3cac8
commit
507d1c61e3
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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):
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user