summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean McGinnis <sean.mcginnis@gmail.com>2020-03-31 14:06:30 -0500
committerSean McGinnis <sean.mcginnis@gmail.com>2020-03-31 14:40:09 -0500
commit66b3da9689e293cdb819e989b6c469012b3db756 (patch)
tree7f1ec9fc5ec6a39631894cbeeca7499df91e6824
parentd93bfe182e46837e0f90a3bb2e73aa3aeec8fdc9 (diff)
downloadoslo-config-66b3da9689e293cdb819e989b6c469012b3db756.tar.gz
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>
-rw-r--r--lower-constraints.txt1
-rw-r--r--oslo_config/tests/test_cfg.py2
-rw-r--r--oslo_config/tests/test_generator.py2
-rw-r--r--oslo_config/tests/test_sphinxconfiggen.py3
-rw-r--r--oslo_config/tests/test_sphinxext.py2
-rw-r--r--oslo_config/tests/test_validator.py3
-rw-r--r--test-requirements.txt3
7 files changed, 7 insertions, 9 deletions
diff --git a/lower-constraints.txt b/lower-constraints.txt
index 7c453f2..d1b2522 100644
--- a/lower-constraints.txt
+++ b/lower-constraints.txt
@@ -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
diff --git a/oslo_config/tests/test_cfg.py b/oslo_config/tests/test_cfg.py
index 98bd8e3..ac45780 100644
--- a/oslo_config/tests/test_cfg.py
+++ b/oslo_config/tests/test_cfg.py
@@ -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
diff --git a/oslo_config/tests/test_generator.py b/oslo_config/tests/test_generator.py
index becd49a..9ddb56f 100644
--- a/oslo_config/tests/test_generator.py
+++ b/oslo_config/tests/test_generator.py
@@ -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
diff --git a/oslo_config/tests/test_sphinxconfiggen.py b/oslo_config/tests/test_sphinxconfiggen.py
index 982641e..e4ddcba 100644
--- a/oslo_config/tests/test_sphinxconfiggen.py
+++ b/oslo_config/tests/test_sphinxconfiggen.py
@@ -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
diff --git a/oslo_config/tests/test_sphinxext.py b/oslo_config/tests/test_sphinxext.py
index b35af71..340ee4e 100644
--- a/oslo_config/tests/test_sphinxext.py
+++ b/oslo_config/tests/test_sphinxext.py
@@ -11,8 +11,8 @@
# under the License.
import textwrap
+from unittest import mock
-import mock
from oslotest import base
from oslo_config import cfg
diff --git a/oslo_config/tests/test_validator.py b/oslo_config/tests/test_validator.py
index a2ffde7..de912ac 100644
--- a/oslo_config/tests/test_validator.py
+++ b/oslo_config/tests/test_validator.py
@@ -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
diff --git a/test-requirements.txt b/test-requirements.txt
index 47086b2..96ff91f 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -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