mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 21:00:22 -07:00
More template unit tests for v2
This commit is contained in:
parent
23cd3294d0
commit
9aa8676bdd
4 changed files with 33 additions and 7 deletions
|
@ -38,6 +38,12 @@ class DictDataLoader(DataLoader):
|
|||
return self.load(self._file_mapping[path], path)
|
||||
return None
|
||||
|
||||
def _get_file_contents(self, path):
|
||||
if path in self._file_mapping:
|
||||
return self._file_mapping[path]
|
||||
else:
|
||||
raise AnsibleParserError("file not found: %s" % path)
|
||||
|
||||
def path_exists(self, path):
|
||||
return path in self._file_mapping or path in self._known_directories
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue