diff options
Diffstat (limited to 'tests/unit/mock/loader.py')
-rw-r--r-- | tests/unit/mock/loader.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/unit/mock/loader.py b/tests/unit/mock/loader.py index c21188e..aea5df5 100644 --- a/tests/unit/mock/loader.py +++ b/tests/unit/mock/loader.py @@ -46,12 +46,12 @@ class DictDataLoader(DataLoader): # TODO: the real _get_file_contents returns a bytestring, so we actually convert the # unicode/text it's created with to utf-8 - def _get_file_contents(self, path): - path = to_text(path) + def _get_file_contents(self, file_name): + path = to_text(file_name) if path in self._file_mapping: - return (to_bytes(self._file_mapping[path]), False) + return (to_bytes(self._file_mapping[file_name]), False) else: - raise AnsibleParserError("file not found: %s" % path) + raise AnsibleParserError("file not found: %s" % file_name) def path_exists(self, path): path = to_text(path) |