From a1f08cde67dfe33c15731272b3cd8352d8946e15 Mon Sep 17 00:00:00 2001 From: twangboy Date: Mon, 13 May 2019 17:15:04 -0600 Subject: [PATCH] Mock __utils__ instead of __salt__ --- tests/unit/modules/test_win_system.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/unit/modules/test_win_system.py b/tests/unit/modules/test_win_system.py index 009563a241b5..54f61dca7879 100644 --- a/tests/unit/modules/test_win_system.py +++ b/tests/unit/modules/test_win_system.py @@ -290,11 +290,11 @@ def test_get_pending_computer_name(self): with patch.object(win_system, 'get_computer_name', MagicMock(return_value='salt')): reg_mock = MagicMock(return_value={'vdata': 'salt'}) - with patch.dict(win_system.__salt__, {'reg.read_value': reg_mock}): + with patch.dict(win_system.__utils__, {'reg.read_value': reg_mock}): self.assertFalse(win_system.get_pending_computer_name()) reg_mock = MagicMock(return_value={'vdata': 'salt_pending'}) - with patch.dict(win_system.__salt__, {'reg.read_value': reg_mock}): + with patch.dict(win_system.__utils__, {'reg.read_value': reg_mock}): self.assertEqual(win_system.get_pending_computer_name(), 'salt_pending')