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: I3e1e5ed4e72837d45b78e5ccb9ce8cca416e5c11 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
parent
4e6fe7cf7d
commit
b903d4e1ee
|
@ -23,7 +23,6 @@ linecache2==1.0.0
|
|||
Mako==0.4.0
|
||||
MarkupSafe==1.0
|
||||
mccabe==0.2.1
|
||||
mock==2.0.0
|
||||
monotonic==0.6
|
||||
netaddr==0.7.18
|
||||
netifaces==0.10.4
|
||||
|
|
|
@ -16,9 +16,9 @@ import copy
|
|||
import fixtures
|
||||
import pickle
|
||||
import sys
|
||||
from unittest import mock
|
||||
import warnings
|
||||
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
from oslo_context import context as oslo_context
|
||||
from oslotest import base as oslo_test_base
|
||||
|
|
|
@ -16,8 +16,8 @@
|
|||
|
||||
import contextlib
|
||||
import itertools
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from oslotest import base as oslo_test_base
|
||||
import sqlalchemy as sqla
|
||||
from sqlalchemy.engine import url as sqla_url
|
||||
|
|
|
@ -10,11 +10,11 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
import os
|
||||
import testresources
|
||||
import testscenarios
|
||||
import unittest
|
||||
from unittest import mock
|
||||
|
||||
from oslo_db import exception
|
||||
from oslo_db.sqlalchemy import enginefacade
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
from unittest import mock
|
||||
|
||||
import alembic
|
||||
import mock
|
||||
from oslotest import base as test_base
|
||||
import sqlalchemy
|
||||
|
||||
|
|
|
@ -16,10 +16,10 @@
|
|||
|
||||
import os
|
||||
import tempfile
|
||||
from unittest import mock
|
||||
|
||||
from migrate import exceptions as migrate_exception
|
||||
from migrate.versioning import api as versioning_api
|
||||
import mock
|
||||
import sqlalchemy
|
||||
|
||||
from oslo_db import exception as db_exception
|
||||
|
|
|
@ -13,10 +13,10 @@
|
|||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
from unittest import mock
|
||||
|
||||
import fixtures
|
||||
from migrate.versioning import api as versioning_api
|
||||
import mock
|
||||
from oslotest import base as test
|
||||
import sqlalchemy as sa
|
||||
import sqlalchemy.ext.declarative as sa_decl
|
||||
|
|
|
@ -15,8 +15,8 @@
|
|||
|
||||
from collections import abc
|
||||
import datetime
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from oslotest import base as oslo_test
|
||||
from sqlalchemy import Column
|
||||
from sqlalchemy import Integer, String
|
||||
|
|
|
@ -14,8 +14,7 @@
|
|||
"""Tests for MySQL Cluster (NDB) Support."""
|
||||
|
||||
import logging
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_db import exception
|
||||
from oslo_db.sqlalchemy import enginefacade
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
import os
|
||||
from unittest import mock
|
||||
|
||||
from oslotest import base as oslo_test_base
|
||||
from sqlalchemy import exc as sa_exc
|
||||
|
|
|
@ -19,9 +19,9 @@
|
|||
|
||||
import logging
|
||||
import os
|
||||
from unittest import mock
|
||||
|
||||
import fixtures
|
||||
import mock
|
||||
from oslo_config import cfg
|
||||
from oslotest import base as oslo_test
|
||||
import sqlalchemy
|
||||
|
|
|
@ -13,10 +13,10 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from unittest import mock
|
||||
from urllib import parse
|
||||
|
||||
import fixtures
|
||||
import mock
|
||||
from oslotest import base as test_base
|
||||
import sqlalchemy
|
||||
from sqlalchemy.dialects import mysql
|
||||
|
|
|
@ -15,7 +15,8 @@
|
|||
|
||||
"""Unit tests for DB API."""
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_config import cfg
|
||||
from oslo_utils import importutils
|
||||
|
||||
|
|
|
@ -14,8 +14,7 @@
|
|||
# under the License.
|
||||
|
||||
import sys
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslo_db import concurrency
|
||||
from oslo_db.tests import utils as test_utils
|
||||
|
|
|
@ -5,7 +5,6 @@ hacking>=3.0,<3.1.0 # Apache-2.0
|
|||
coverage!=4.4,>=4.0 # Apache-2.0
|
||||
eventlet!=0.18.3,!=0.20.1,>=0.18.2 # MIT
|
||||
fixtures>=3.0.0 # Apache-2.0/BSD
|
||||
mock>=2.0.0 # BSD
|
||||
python-subunit>=1.0.0 # Apache-2.0/BSD
|
||||
oslotest>=3.2.0 # Apache-2.0
|
||||
oslo.context>=2.19.2 # Apache-2.0
|
||||
|
|
Loading…
Reference in New Issue