def test_find_interfaces(self): """ Test for Returns the bridge to which the interfaces are bond to """ mock = MagicMock(return_value=None) with patch.object(bridge, "_os_dispatch", mock): self.assertEqual(bridge.find_interfaces(), None) mock = MagicMock(return_value={"interfaces": "A"}) with patch.object(bridge, "_os_dispatch", mock): self.assertEqual(bridge.find_interfaces(), {})
def test_find_interfaces(self): ''' Test for Returns the bridge to which the interfaces are bond to ''' mock = MagicMock(return_value=None) with patch.object(bridge, '_os_dispatch', mock): self.assertEqual(bridge.find_interfaces(), None) mock = MagicMock(return_value={'interfaces': 'A'}) with patch.object(bridge, '_os_dispatch', mock): self.assertEqual(bridge.find_interfaces(), {})