mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 06:10:22 -07:00
dependent lookup: avoid deprecated ansible-core 2.19 functionality (#10359)
* Avoid deprecated ansible-core 2.19 functionality. * Adjust unit tests.
This commit is contained in:
parent
4195cbb364
commit
16d6e4a8e5
3 changed files with 9 additions and 6 deletions
|
@ -9,10 +9,9 @@ from __future__ import absolute_import, division, print_function
|
|||
__metaclass__ = type
|
||||
|
||||
|
||||
from ansible.template import Templar
|
||||
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.compat.unittest import TestCase
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.compat.mock import (
|
||||
MagicMock,
|
||||
)
|
||||
from ansible_collections.community.internal_test_tools.tests.unit.utils.trust import make_trusted
|
||||
|
||||
from ansible.plugins.loader import lookup_loader
|
||||
|
@ -20,8 +19,7 @@ from ansible.plugins.loader import lookup_loader
|
|||
|
||||
class TestLookupModule(TestCase):
|
||||
def setUp(self):
|
||||
templar = MagicMock()
|
||||
templar._loader = None
|
||||
templar = Templar(loader=None)
|
||||
self.lookup = lookup_loader.get("community.general.dependent", templar=templar)
|
||||
|
||||
def test_empty(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue