diff --git a/tests/unit/states/test_user.py b/tests/unit/states/test_user.py index 52f7997045..4b7a3d8149 100644 --- a/tests/unit/states/test_user.py +++ b/tests/unit/states/test_user.py @@ -240,6 +240,7 @@ class UserTestCase(TestCase, LoaderModuleMockMixin): 'shadow.default_hash': shadow_hash, 'file.group_to_gid': MagicMock(side_effect=['foo']), 'file.gid_to_group': MagicMock(side_effect=[5000])} + def mock_exists(*args): return True diff --git a/tests/unit/test_crypt.py b/tests/unit/test_crypt.py index a425cf3c5f..56d50b79b2 100644 --- a/tests/unit/test_crypt.py +++ b/tests/unit/test_crypt.py @@ -8,7 +8,7 @@ import shutil # salt testing libs from tests.support.unit import TestCase, skipIf -from tests.support.mock import( +from tests.support.mock import ( patch, mock_open, NO_MOCK,