From 73fa76d79209fdea24e7c71ce099889be2ad64ef Mon Sep 17 00:00:00 2001 From: Sean Dague <sean@dague.net> Date: Tue, 23 Jan 2018 08:02:00 -0500 Subject: [PATCH] Add missing mock call for test_minimal_config (#11858) In local testing py36 always fails on test_minimal_config on a wait call that never completes. One difference between this test and others in the class is the lack of a mock on `call`. With this added, the test passes locally 100%. --- tests/components/switch/test_wake_on_lan.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/components/switch/test_wake_on_lan.py b/tests/components/switch/test_wake_on_lan.py index 3042535ff42..2c4be648c8c 100644 --- a/tests/components/switch/test_wake_on_lan.py +++ b/tests/components/switch/test_wake_on_lan.py @@ -98,6 +98,7 @@ class TestWOLSwitch(unittest.TestCase): self.assertEqual(STATE_ON, state.state) @patch('wakeonlan.wol.send_magic_packet', new=send_magic_packet) + @patch('subprocess.call', new=call) def test_minimal_config(self): """Test with minimal config.""" self.assertTrue(setup_component(self.hass, switch.DOMAIN, {