From ee3ad08e14440a8e534747bbd9f8ff563fcfd583 Mon Sep 17 00:00:00 2001 From: Alexander Fischer Date: Wed, 6 Mar 2019 16:40:25 +0100 Subject: [PATCH] Define __opts__ dict --- tests/unit/modules/test_win_file.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/unit/modules/test_win_file.py b/tests/unit/modules/test_win_file.py index dc525dd93b..65b2167965 100644 --- a/tests/unit/modules/test_win_file.py +++ b/tests/unit/modules/test_win_file.py @@ -38,6 +38,13 @@ class WinFileTestCase(TestCase): else: FAKE_PATH = os.sep.join(['path', 'does', 'not', 'exist']) + def setup_loader_modules(self): + self.current_user = salt.utils.win_functions.get_current_user(False) + return { + win_file: { + '__opts__': { + 'test': False}}} + def test_issue_43328_stats(self): ''' Make sure that a CommandExecutionError is raised if the file does NOT