diff options
author | Matt Clay <matt@mystile.com> | 2022-02-23 03:20:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-23 03:20:11 +0100 |
commit | 1a5853d794d921daf21ff41c5bf381ecda2625cd (patch) | |
tree | 4b0d34bb3b820640b5d26b0e53cbac853497574e /test/units/utils | |
parent | More strict pylint checking of ansible-test code. (diff) | |
download | ansible-1a5853d794d921daf21ff41c5bf381ecda2625cd.tar.xz ansible-1a5853d794d921daf21ff41c5bf381ecda2625cd.zip |
Remove obsolete units.compat.mock compat layer. (#77118)
* Remove obsolete units.compat.mock compat layer.
* Update remaining units.compat.mock references.
Diffstat (limited to 'test/units/utils')
-rw-r--r-- | test/units/utils/collection_loader/test_collection_loader.py | 2 | ||||
-rw-r--r-- | test/units/utils/test_display.py | 2 | ||||
-rw-r--r-- | test/units/utils/test_vars.py | 4 |
3 files changed, 5 insertions, 3 deletions
diff --git a/test/units/utils/collection_loader/test_collection_loader.py b/test/units/utils/collection_loader/test_collection_loader.py index 1aa8eccf7f..3ae04cbd10 100644 --- a/test/units/utils/collection_loader/test_collection_loader.py +++ b/test/units/utils/collection_loader/test_collection_loader.py @@ -17,7 +17,7 @@ from ansible.utils.collection_loader._collection_finder import ( _get_collection_name_from_path, _get_collection_role_path, _get_collection_metadata, _iter_modules_impl ) from ansible.utils.collection_loader._collection_config import _EventSource -from units.compat.mock import MagicMock, NonCallableMagicMock, patch +from mock import MagicMock, NonCallableMagicMock, patch # fixture to ensure we always clean up the import stuff when we're done diff --git a/test/units/utils/test_display.py b/test/units/utils/test_display.py index 1e73c2add4..8807b81675 100644 --- a/test/units/utils/test_display.py +++ b/test/units/utils/test_display.py @@ -5,7 +5,7 @@ from __future__ import absolute_import, division, print_function __metaclass__ = type -from units.compat.mock import MagicMock +from mock import MagicMock import pytest diff --git a/test/units/utils/test_vars.py b/test/units/utils/test_vars.py index c92ce4b6ed..1df0eab32b 100644 --- a/test/units/utils/test_vars.py +++ b/test/units/utils/test_vars.py @@ -22,7 +22,9 @@ __metaclass__ = type from collections import defaultdict -from units.compat import mock, unittest +import mock + +from units.compat import unittest from ansible.errors import AnsibleError from ansible.utils.vars import combine_vars, merge_hash |