def test_list_(self): """ Test for Returns the machine's bridges list """ mock = MagicMock(return_value=None) with patch.object(bridge, "_os_dispatch", mock): self.assertEqual(bridge.list_(), None) mock = MagicMock(return_value=["A", "B"]) with patch.object(bridge, "_os_dispatch", mock): self.assertEqual(bridge.list_(), ["A", "B"])
def test_list_(self): ''' Test for Returns the machine's bridges list ''' mock = MagicMock(return_value=None) with patch.object(bridge, '_os_dispatch', mock): self.assertEqual(bridge.list_(), None) mock = MagicMock(return_value=['A', 'B']) with patch.object(bridge, '_os_dispatch', mock): self.assertEqual(bridge.list_(), ['A', 'B'])