def test_multiple_addrs(self): greendns.resolve.add('host.example.com', '1.2.3.4') greendns.resolve.add('host.example.com', '1.2.3.5') greendns.getaliases = self._make_mock_getaliases() greendns.getaliases.aliases = [] res = greendns.gethostbyname_ex('host.example.com') assert res == ('host.example.com', [], ['1.2.3.4', '1.2.3.5'])
def test_ipaddr(self): res = greendns.gethostbyname_ex('1.2.3.4') assert res == ('1.2.3.4', [], ['1.2.3.4'])