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: I4b70b6adbfef1f431bf367e3ee1e385604e38f9a Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
parent
565380c647
commit
c901aef1d4
@ -11,5 +11,4 @@ testscenarios>=0.5.0 # Apache-2.0/BSD
|
|||||||
testtools>=2.3.0 # MIT
|
testtools>=2.3.0 # MIT
|
||||||
stestr>=2.0.0 # Apache-2.0
|
stestr>=2.0.0 # Apache-2.0
|
||||||
reno>=2.7.0 # Apache-2.0
|
reno>=2.7.0 # Apache-2.0
|
||||||
mock>=2.0.0 # BSD
|
|
||||||
zake>=0.1.6 # Apache-2.0
|
zake>=0.1.6 # Apache-2.0
|
||||||
|
@ -16,12 +16,12 @@
|
|||||||
|
|
||||||
# noinspection PyPackageRequirements
|
# noinspection PyPackageRequirements
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
from unittest import mock
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
|
|
||||||
from keystonemiddleware import fixture as ksm_fixture
|
from keystonemiddleware import fixture as ksm_fixture
|
||||||
# noinspection PyPackageRequirements
|
# noinspection PyPackageRequirements
|
||||||
import mock
|
|
||||||
from vitrage.tests.functional.api.v1 import FunctionalTest
|
from vitrage.tests.functional.api.v1 import FunctionalTest
|
||||||
|
|
||||||
EVENT_DETAILS = {
|
EVENT_DETAILS = {
|
||||||
|
@ -15,11 +15,11 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
# noinspection PyPackageRequirements
|
# noinspection PyPackageRequirements
|
||||||
|
from unittest import mock
|
||||||
import uuid
|
import uuid
|
||||||
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
# noinspection PyPackageRequirements
|
# noinspection PyPackageRequirements
|
||||||
import mock
|
|
||||||
from six.moves import http_client as httplib
|
from six.moves import http_client as httplib
|
||||||
from vitrage.tests.functional.api.v1 import FunctionalTest
|
from vitrage.tests.functional.api.v1 import FunctionalTest
|
||||||
|
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
# noinspection PyPackageRequirements
|
# noinspection PyPackageRequirements
|
||||||
import json
|
import json
|
||||||
import mock
|
|
||||||
import requests_mock
|
import requests_mock
|
||||||
|
from unittest import mock
|
||||||
from vitrage.middleware.keycloak import KeycloakAuth
|
from vitrage.middleware.keycloak import KeycloakAuth
|
||||||
from vitrage.tests.functional.api.v1 import FunctionalTest
|
from vitrage.tests.functional.api.v1 import FunctionalTest
|
||||||
from webtest import TestRequest
|
from webtest import TestRequest
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
# noinspection PyPackageRequirements
|
# noinspection PyPackageRequirements
|
||||||
import mock
|
from unittest import mock
|
||||||
from vitrage.common.utils import compress_obj
|
from vitrage.common.utils import compress_obj
|
||||||
|
|
||||||
from vitrage.storage.sqlalchemy import models
|
from vitrage.storage.sqlalchemy import models
|
||||||
|
@ -15,11 +15,11 @@
|
|||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
import os
|
import os
|
||||||
import socket
|
import socket
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
# noinspection PyPackageRequirements
|
# noinspection PyPackageRequirements
|
||||||
from iso8601.iso8601 import UTC
|
from iso8601.iso8601 import UTC
|
||||||
# noinspection PyPackageRequirements
|
# noinspection PyPackageRequirements
|
||||||
import mock
|
|
||||||
from oslo_utils import timeutils
|
from oslo_utils import timeutils
|
||||||
# noinspection PyPackageRequirements
|
# noinspection PyPackageRequirements
|
||||||
import webtest
|
import webtest
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import mock
|
from unittest import mock
|
||||||
|
|
||||||
import oslo_messaging
|
import oslo_messaging
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import mock
|
from unittest import mock
|
||||||
|
|
||||||
from vitrage.api_handler.apis.template import TemplateApis
|
from vitrage.api_handler.apis.template import TemplateApis
|
||||||
from vitrage.evaluator import init_template_schemas
|
from vitrage.evaluator import init_template_schemas
|
||||||
|
@ -13,7 +13,8 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
# noinspection PyPackageRequirements
|
# noinspection PyPackageRequirements
|
||||||
import mock
|
from unittest import mock
|
||||||
|
|
||||||
from oslo_config import cfg
|
from oslo_config import cfg
|
||||||
# noinspection PyPackageRequirements
|
# noinspection PyPackageRequirements
|
||||||
from testtools import matchers
|
from testtools import matchers
|
||||||
|
@ -13,7 +13,8 @@
|
|||||||
|
|
||||||
from alembic import script
|
from alembic import script
|
||||||
import contextlib
|
import contextlib
|
||||||
import mock
|
from unittest import mock
|
||||||
|
|
||||||
from oslo_db.sqlalchemy import enginefacade
|
from oslo_db.sqlalchemy import enginefacade
|
||||||
from oslo_db.sqlalchemy import test_fixtures
|
from oslo_db.sqlalchemy import test_fixtures
|
||||||
from oslo_db.sqlalchemy import test_migrations
|
from oslo_db.sqlalchemy import test_migrations
|
||||||
|
Loading…
x
Reference in New Issue
Block a user