def get_host_ip_addr(self): """Retrieves the IP address of the dom0 """ return hostops.get_host_ip_address()
def test_get_host_ip_address(self, mock_local_ips): mock_local_ips.return_value = [mock.sentinel.ip] CONF.set_override('my_ip', None) self.assertEqual(mock.sentinel.ip, hostops.get_host_ip_address()) mock_local_ips.assert_called_once_with()