From 2e2351a69e073947a062c7e1e7ef7778653c67be Mon Sep 17 00:00:00 2001 From: Tobi-wan Kenobi Date: Sat, 10 Dec 2016 19:35:38 +0100 Subject: [PATCH] [tests] Mock Popen() in module tests --- tests/modules/test_modules.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/modules/test_modules.py b/tests/modules/test_modules.py index 0e01873..7db9492 100644 --- a/tests/modules/test_modules.py +++ b/tests/modules/test_modules.py @@ -28,7 +28,8 @@ class TestGenericModules(unittest.TestCase): widget.set("variable", "value") self.assertEquals(widget.get("variable", None), "value") - def test_update(self): + @mock.patch("subprocess.Popen") + def test_update(self, mock_output): for mod in self.objects: widgets = self.objects[mod].widgets() self.objects[mod].update(widgets)