From 8f2332f45ce8760d5caa14c505a640976772c0e0 Mon Sep 17 00:00:00 2001 From: twangboy Date: Fri, 19 Jan 2018 22:15:13 +0000 Subject: [PATCH] Mock sys.platform so the test runs on Windows --- tests/unit/utils/test_process.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/unit/utils/test_process.py b/tests/unit/utils/test_process.py index 70de72cbb7..97fdae2e79 100644 --- a/tests/unit/utils/test_process.py +++ b/tests/unit/utils/test_process.py @@ -228,7 +228,8 @@ class TestProcess(TestCase): ret = salt.utils.process.daemonize_if({}) self.assertEqual(None, ret) - with patch('salt.utils.process.daemonize'): + with patch('salt.utils.process.daemonize'), \ + patch('sys.platform', 'linux2'): salt.utils.process.daemonize_if({}) self.assertTrue(salt.utils.process.daemonize.called) # pylint: enable=assignment-from-none