diff options
author | Sean McGinnis <sean.mcginnis@gmail.com> | 2020-03-31 13:59:44 -0500 |
---|---|---|
committer | Sean McGinnis <sean.mcginnis@gmail.com> | 2020-03-31 14:38:48 -0500 |
commit | ced4d8eae4a6399251840fb5ef95eb74ec497464 (patch) | |
tree | 7e2c7ae1de3b33dd1259119d8690ad275423a8a6 /oslo_policy | |
parent | c483dee1f306b698448fbee9169038159209e916 (diff) | |
download | oslo-policy-ced4d8eae4a6399251840fb5ef95eb74ec497464.tar.gz |
Use unittest.mock instead of third party mock3.0.3
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: Ib1f840f0cb778219f7640a2ca307847a090de6aa
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
Diffstat (limited to 'oslo_policy')
-rw-r--r-- | oslo_policy/tests/test_checks.py | 3 | ||||
-rw-r--r-- | oslo_policy/tests/test_external.py | 3 | ||||
-rw-r--r-- | oslo_policy/tests/test_generator.py | 2 | ||||
-rw-r--r-- | oslo_policy/tests/test_parser.py | 3 | ||||
-rw-r--r-- | oslo_policy/tests/test_policy.py | 2 | ||||
-rw-r--r-- | oslo_policy/tests/test_shell.py | 3 | ||||
-rw-r--r-- | oslo_policy/tests/test_sphinxpolicygen.py | 3 |
7 files changed, 12 insertions, 7 deletions
diff --git a/oslo_policy/tests/test_checks.py b/oslo_policy/tests/test_checks.py index 8c2f143..61b5154 100644 --- a/oslo_policy/tests/test_checks.py +++ b/oslo_policy/tests/test_checks.py @@ -13,7 +13,8 @@ # License for the specific language governing permissions and limitations # under the License. -import mock +from unittest import mock + from oslotest import base as test_base from oslo_policy import _checks diff --git a/oslo_policy/tests/test_external.py b/oslo_policy/tests/test_external.py index 92ff539..80fdec8 100644 --- a/oslo_policy/tests/test_external.py +++ b/oslo_policy/tests/test_external.py @@ -14,7 +14,8 @@ # under the License. import json -import mock +from unittest import mock + from oslo_serialization import jsonutils from requests_mock.contrib import fixture as rm_fixture import six.moves.urllib.parse as urlparse diff --git a/oslo_policy/tests/test_generator.py b/oslo_policy/tests/test_generator.py index bb3ee89..33d420e 100644 --- a/oslo_policy/tests/test_generator.py +++ b/oslo_policy/tests/test_generator.py @@ -10,9 +10,9 @@ # under the License. import operator +from unittest import mock import warnings -import mock from oslo_config import cfg import stevedore import testtools diff --git a/oslo_policy/tests/test_parser.py b/oslo_policy/tests/test_parser.py index df5bbbc..edfd475 100644 --- a/oslo_policy/tests/test_parser.py +++ b/oslo_policy/tests/test_parser.py @@ -13,7 +13,8 @@ # License for the specific language governing permissions and limitations # under the License. -import mock +from unittest import mock + from oslotest import base as test_base import six diff --git a/oslo_policy/tests/test_policy.py b/oslo_policy/tests/test_policy.py index bc41054..f3f75b0 100644 --- a/oslo_policy/tests/test_policy.py +++ b/oslo_policy/tests/test_policy.py @@ -16,8 +16,8 @@ """Test of Policy Engine""" import os +from unittest import mock -import mock from oslo_config import cfg from oslo_context import context from oslo_serialization import jsonutils diff --git a/oslo_policy/tests/test_shell.py b/oslo_policy/tests/test_shell.py index 32dad51..0eb6aa6 100644 --- a/oslo_policy/tests/test_shell.py +++ b/oslo_policy/tests/test_shell.py @@ -14,7 +14,8 @@ # under the License. import copy -import mock +from unittest import mock + from oslo_serialization import jsonutils from oslo_policy import shell diff --git a/oslo_policy/tests/test_sphinxpolicygen.py b/oslo_policy/tests/test_sphinxpolicygen.py index ad65ec3..461d6c5 100644 --- a/oslo_policy/tests/test_sphinxpolicygen.py +++ b/oslo_policy/tests/test_sphinxpolicygen.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_policy import sphinxpolicygen |