Skip to content

Commit

Permalink
unit test (mock loader) - fix pylint arguments-renamed
Browse files Browse the repository at this point in the history
  • Loading branch information
tremble committed Aug 12, 2021
1 parent 19f58ca commit c70a009
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/unit/mock/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ def load_from_file(self, path, cache=True, unsafe=False):

# 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)
if path in self._file_mapping:
return (to_bytes(self._file_mapping[path]), False)
def _get_file_contents(self, file_name):
file_name = to_text(file_name)
if file_name in self._file_mapping:
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)
Expand Down

0 comments on commit c70a009

Please sign in to comment.