[PR #9921/410cf72a backport][stable-10] Unit tests: replace mock and compat with code from community.internal_test_tools (#9922)

Unit tests: replace mock and compat with code from community.internal_test_tools (#9921)

* Replace compat with equivalent from community.internal_test_tools.

* Replace mock with equivalent from community.internal_test_tools.

(cherry picked from commit 410cf72aec)

Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
patchback[bot]
2025-03-22 14:20:45 +01:00
committed by GitHub
parent 57dcd31c82
commit c95a8b6540
135 changed files with 180 additions and 490 deletions

View File

@@ -20,9 +20,9 @@ from ansible.inventory.data import InventoryData
from ansible.inventory.manager import InventoryManager
from ansible.module_utils.common.text.converters import to_native
from ansible_collections.community.internal_test_tools.tests.unit.mock.loader import DictDataLoader
from ansible_collections.community.internal_test_tools.tests.unit.mock.path import mock_unfrackpath_noop
from ansible_collections.community.general.plugins.inventory.opennebula import InventoryModule
from ansible_collections.community.general.tests.unit.mock.path import mock_unfrackpath_noop
original_exists = os.path.exists