def test_halt(self):
        mock = MagicMock(return_value='salt')
        with patch.object(win_system, 'shutdown', mock):
            self.assertEqual(win_system.halt(), 'salt')
Test to halt a running system
dataset/ETHPy150Open saltstack/salt/tests/unit/modules/win_system_test.py/WinSystemTestCase.test_halt