コード例 #1
0
 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'])
コード例 #2
0
 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'])
コード例 #3
0
 def test_ipaddr(self):
     res = greendns.gethostbyname_ex('1.2.3.4')
     assert res == ('1.2.3.4', [], ['1.2.3.4'])
コード例 #4
0
 def test_ipaddr(self):
     res = greendns.gethostbyname_ex('1.2.3.4')
     assert res == ('1.2.3.4', [], ['1.2.3.4'])