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: I26f2df6d4657133a5c7e6ed85298aa843c1bdd73 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
parent
79b3d5bb5a
commit
4d2310b2a9
@ -24,7 +24,6 @@ kombu==4.0.0
|
|||||||
linecache2==1.0.0
|
linecache2==1.0.0
|
||||||
MarkupSafe==1.0
|
MarkupSafe==1.0
|
||||||
mccabe==0.2.1
|
mccabe==0.2.1
|
||||||
mock==2.0.0
|
|
||||||
mox3==0.20.0
|
mox3==0.20.0
|
||||||
msgpack-python==0.4.0
|
msgpack-python==0.4.0
|
||||||
netaddr==0.7.18
|
netaddr==0.7.18
|
||||||
|
@ -27,10 +27,11 @@ import datetime
|
|||||||
import hashlib
|
import hashlib
|
||||||
import inspect
|
import inspect
|
||||||
import logging
|
import logging
|
||||||
import mock
|
from unittest import mock
|
||||||
from oslo_utils import versionutils as vutils
|
|
||||||
|
|
||||||
import fixtures
|
import fixtures
|
||||||
|
from oslo_utils import versionutils as vutils
|
||||||
|
|
||||||
from oslo_versionedobjects import base
|
from oslo_versionedobjects import base
|
||||||
from oslo_versionedobjects import fields
|
from oslo_versionedobjects import fields
|
||||||
|
|
||||||
|
@ -25,8 +25,8 @@ eventlet.monkey_patch(os=False) # noqa
|
|||||||
|
|
||||||
import functools
|
import functools
|
||||||
import inspect
|
import inspect
|
||||||
import mock
|
|
||||||
import os
|
import os
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
import fixtures
|
import fixtures
|
||||||
from oslo_concurrency import lockutils
|
from oslo_concurrency import lockutils
|
||||||
|
@ -11,13 +11,11 @@
|
|||||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
from oslo_versionedobjects import exception
|
from oslo_versionedobjects import exception
|
||||||
from oslo_versionedobjects import test
|
from oslo_versionedobjects import test
|
||||||
|
|
||||||
import mock
|
|
||||||
|
|
||||||
|
|
||||||
notifier = mock.Mock()
|
notifier = mock.Mock()
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,10 +14,10 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import datetime
|
import datetime
|
||||||
|
from unittest import mock
|
||||||
import warnings
|
import warnings
|
||||||
|
|
||||||
import iso8601
|
import iso8601
|
||||||
import mock
|
|
||||||
import netaddr
|
import netaddr
|
||||||
import testtools
|
import testtools
|
||||||
|
|
||||||
|
@ -17,9 +17,9 @@ import copy
|
|||||||
import datetime
|
import datetime
|
||||||
import hashlib
|
import hashlib
|
||||||
import inspect
|
import inspect
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
import iso8601
|
import iso8601
|
||||||
import mock
|
|
||||||
|
|
||||||
from oslo_versionedobjects import base
|
from oslo_versionedobjects import base
|
||||||
from oslo_versionedobjects import exception
|
from oslo_versionedobjects import exception
|
||||||
|
@ -17,8 +17,8 @@ import datetime
|
|||||||
import jsonschema
|
import jsonschema
|
||||||
import logging
|
import logging
|
||||||
import pytz
|
import pytz
|
||||||
|
from unittest import mock
|
||||||
|
|
||||||
import mock
|
|
||||||
from oslo_context import context
|
from oslo_context import context
|
||||||
from oslo_serialization import jsonutils
|
from oslo_serialization import jsonutils
|
||||||
from oslo_utils import timeutils
|
from oslo_utils import timeutils
|
||||||
|
@ -8,7 +8,6 @@ coverage!=4.4,>=4.0 # Apache-2.0
|
|||||||
jsonschema>=2.6.0 # MIT
|
jsonschema>=2.6.0 # MIT
|
||||||
stestr>=2.0.0 # Apache-2.0
|
stestr>=2.0.0 # Apache-2.0
|
||||||
|
|
||||||
mock>=2.0.0 # BSD
|
|
||||||
fixtures>=3.0.0 # Apache-2.0/BSD
|
fixtures>=3.0.0 # Apache-2.0/BSD
|
||||||
|
|
||||||
# Bandit security code scanner
|
# Bandit security code scanner
|
||||||
|
Loading…
x
Reference in New Issue
Block a user