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:
Sean McGinnis 2020-03-31 13:47:04 -05:00
parent 4e6fe7cf7d
commit b903d4e1ee
No known key found for this signature in database
GPG Key ID: CE7EE4BFAF8D70C8
15 changed files with 14 additions and 17 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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