[tests] Add mocking for module tests
This commit is contained in:
parent
1d6ca352b9
commit
9fe0915730
1 changed files with 3 additions and 1 deletions
|
@ -26,7 +26,9 @@ class TestGenericModules(unittest.TestCase):
|
||||||
for widget in self.objects[mod["name"]].widgets():
|
for widget in self.objects[mod["name"]].widgets():
|
||||||
self.assertEquals(widget.get("variable", None), None)
|
self.assertEquals(widget.get("variable", None), None)
|
||||||
|
|
||||||
def test_widgets(self):
|
@mock.patch("subprocess.Popen")
|
||||||
|
def test_widgets(self, mock_output):
|
||||||
|
mock_output.return_value = MockCommunicate()
|
||||||
for mod in self.objects:
|
for mod in self.objects:
|
||||||
widgets = self.objects[mod].widgets()
|
widgets = self.objects[mod].widgets()
|
||||||
for widget in widgets:
|
for widget in widgets:
|
||||||
|
|
Loading…
Reference in a new issue