def test_get_localhost_ipv6(self): CONF.set_override('ipv6', True, group='network') localhost = network_utils._get_localhost() self.assertEqual('::1', localhost)
def test_get_localhost_ipv4(self): CONF.set_override('ipv6', False, group='network') localhost = network_utils._get_localhost() self.assertEqual('127.0.0.1', localhost)