More template unit tests for v2

This commit is contained in:
James Cammarata 2015-05-17 01:06:02 -05:00
commit 9aa8676bdd
4 changed files with 33 additions and 7 deletions

View file

@ -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