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: I2f8067eeb2aec62f098bfbb3770a67f1876ce7a2 Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
parent
d93bfe182e
commit
66b3da9689
@ -19,7 +19,6 @@ keystoneauth1==3.4.0
|
||||
linecache2==1.0.0
|
||||
MarkupSafe==1.0
|
||||
mccabe==0.2.1
|
||||
mock==3.0.0
|
||||
mox3==0.20.0
|
||||
mypy==0.720
|
||||
netaddr==0.7.18
|
||||
|
@ -21,9 +21,9 @@ import os
|
||||
import shutil
|
||||
import sys
|
||||
import tempfile
|
||||
from unittest import mock
|
||||
|
||||
import fixtures
|
||||
import mock
|
||||
from oslotest import base
|
||||
import testscenarios
|
||||
|
||||
|
@ -15,9 +15,9 @@
|
||||
import io
|
||||
import sys
|
||||
import textwrap
|
||||
from unittest import mock
|
||||
|
||||
import fixtures
|
||||
import mock
|
||||
from oslotest import base
|
||||
import tempfile
|
||||
import testscenarios
|
||||
|
@ -10,7 +10,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslotest import base
|
||||
|
||||
from oslo_config import sphinxconfiggen
|
||||
|
@ -11,8 +11,8 @@
|
||||
# under the License.
|
||||
|
||||
import textwrap
|
||||
from unittest import mock
|
||||
|
||||
import mock
|
||||
from oslotest import base
|
||||
|
||||
from oslo_config import cfg
|
||||
|
@ -12,7 +12,8 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import mock
|
||||
from unittest import mock
|
||||
|
||||
from oslotest import base
|
||||
|
||||
from oslo_config import cfg
|
||||
|
@ -21,9 +21,6 @@ oslo.log>=3.36.0 # Apache-2.0
|
||||
# deps = {[testenv]deps} coverage
|
||||
coverage!=4.4,>=4.0 # Apache-2.0
|
||||
|
||||
# we can switch to unittest.mock once we drop support for Python 3.6 as that
|
||||
# includes https://bugs.python.org/issue32933
|
||||
mock>=3.0.0 # BSD
|
||||
requests_mock>=1.5.0 # Apache-2.0
|
||||
|
||||
# Bandit security code scanner
|
||||
|
Loading…
x
Reference in New Issue
Block a user