def test_get_non_existing_bridge_info(self, mock_runningconfig, current_state_mock): # Getting info of non existing bridge should not raise an exception, # just log a traceback. If it raises an exception the test will fail as # it should. mock_runningconfig.return_value.networks = {'fake': {'bridged': True}} get()
def testGetEmpty(self): result = {} result.update(get()) self.assertEqual(result['networks'], {}) self.assertEqual(result['bridges'], {}) self.assertEqual(result['nics'], {}) self.assertEqual(result['bondings'], {}) self.assertEqual(result['vlans'], {})
def test_get_empty(self, mock_networks, mock_getLinks, current_state_mock): result = {} result.update(get()) assert result['networks'] == {} assert result['bridges'] == {} assert result['nics'] == {} assert result['bondings'] == {} assert result['vlans'] == {}
def test_get_empty(self, mock_networks, mock_getLinks): result = {} result.update(get()) self.assertEqual(result['networks'], {}) self.assertEqual(result['bridges'], {}) self.assertEqual(result['nics'], {}) self.assertEqual(result['bondings'], {}) self.assertEqual(result['vlans'], {})
def testGetNonExistantBridgeInfo(self): # Getting info of non existing bridge should not raise an exception, # just log a traceback. If it raises an exception the test will fail as # it should. get()
def test_get_non_existing_bridge_info(self, mock_runningconfig): # Getting info of non existing bridge should not raise an exception, # just log a traceback. If it raises an exception the test will fail as # it should. mock_runningconfig.return_value.networks = {'fake': {'bridged': True}} get()