[tests] Mock Popen() in module tests

This commit is contained in:
Tobi-wan Kenobi 2016-12-10 19:35:38 +01:00
parent c23af541e4
commit 2e2351a69e

View file

@ -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)