From 2d7e00c670c660bcf620ebc81b9825d7d0271296 Mon Sep 17 00:00:00 2001 From: Pilou Date: Wed, 12 Jul 2017 17:13:25 +0200 Subject: [PATCH] mock_unfrackpath_noop: handle follow parameter (#26662) --- test/units/mock/path.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/units/mock/path.py b/test/units/mock/path.py index 5b7957a69d..f3bd996edb 100644 --- a/test/units/mock/path.py +++ b/test/units/mock/path.py @@ -1,3 +1,5 @@ -def mock_unfrackpath_noop(path): - ''' Do not expand the path ''' - return path +from ansible.compat.tests.mock import MagicMock +from ansible.utils.path import unfrackpath + + +mock_unfrackpath_noop = MagicMock(spec_set=unfrackpath, side_effect=lambda x, *args, **kwargs: x)