コード例 #1
0
ファイル: test_util.py プロジェクト: nbp/mozservices
    def test_dnslookup(self):

        self.assertEqual(dnslookup('http://ziade.org/'),
                         'http://88.191.140.69/')

        self.assertEqual(dnslookup('http://*****:*****@ziade.org:80/path'),
                         'http://*****:*****@88.191.140.69:80/path')
コード例 #2
0
    def test_dnslookup(self):

        self.assertEqual(dnslookup('http://ziade.org/'),
                         'http://88.191.140.69/')

        self.assertEqual(dnslookup('http://*****:*****@ziade.org:80/path'),
                         'http://*****:*****@88.191.140.69:80/path')
コード例 #3
0
ファイル: test_util.py プロジェクト: dannycoates/mozservices
    def test_dnslookup(self):

        ZIADE_DOT_ORG = "195.154.97.69"

        self.assertEqual(dnslookup('http://ziade.org/'),
                         'http://%s/' % (ZIADE_DOT_ORG,))

        self.assertEqual(dnslookup('http://*****:*****@ziade.org:80/path'),
                         'http://*****:*****@%s:80/path' % (ZIADE_DOT_ORG,))
コード例 #4
0
ファイル: test_util.py プロジェクト: dannycoates/mozservices
    def test_dnslookup(self):

        ZIADE_DOT_ORG = "195.154.97.69"

        self.assertEqual(dnslookup('http://ziade.org/'),
                         'http://%s/' % (ZIADE_DOT_ORG, ))

        self.assertEqual(dnslookup('http://*****:*****@ziade.org:80/path'),
                         'http://*****:*****@%s:80/path' % (ZIADE_DOT_ORG, ))
コード例 #5
0
    def test_dnslookup(self):

        # TODO: This priodically breaks when Tarek gets a new IP
        # for his server, we should use something more stable...
        ZIADE_DOT_ORG = "163.172.47.3"

        self.assertEqual(dnslookup('http://ziade.org/'),
                         'http://%s/' % (ZIADE_DOT_ORG,))

        self.assertEqual(dnslookup('http://*****:*****@ziade.org:80/path'),
                         'http://*****:*****@%s:80/path' % (ZIADE_DOT_ORG,))
    def test_dnslookup(self):

        # TODO: This priodically breaks when Tarek gets a new IP
        # for his server, we should use something more stable...
        ZIADE_DOT_ORG = "163.172.47.3"

        self.assertEqual(dnslookup('http://ziade.org/'),
                         'http://%s/' % (ZIADE_DOT_ORG, ))

        self.assertEqual(dnslookup('http://*****:*****@ziade.org:80/path'),
                         'http://*****:*****@%s:80/path' % (ZIADE_DOT_ORG, ))
コード例 #7
0
ファイル: sqlnode.py プロジェクト: hfeeki/tokenserver
    def _dnslookup(self, proxy):
        # does a DNS lookup with gethostbyname and cache it in
        # memory for one hour.
        current, age = self._resolved
        if current is None or age + 3600 < time.time():
            current = dnslookup(proxy)
            self._resolved = current, time.time()

        return current