Exemple #1
0
    def test_resolve(self):

        urls = [('http://*****:*****@localhost/blah?yeah=1#ok',
                 'http://*****:*****@127.0.0.1/blah?yeah=1#ok'),
                ('http://tarek@localhost/blah', 'http://[email protected]/blah')]

        for url, wanted in urls:
            changed, original, resolved = resolve(url)
            self.assertEqual(changed, wanted,
                             '%s vs %s' % (original, resolved))
Exemple #2
0
    def test_resolve(self):

        urls = [('http://*****:*****@localhost/blah?yeah=1#ok',
                 'http://*****:*****@127.0.0.1/blah?yeah=1#ok'),
                ('http://tarek@localhost/blah',
                 'http://[email protected]/blah')]

        for url, wanted in urls:
            changed, original, resolved = resolve(url)
            self.assertEqual(changed, wanted,
                             '%s vs %s' % (original, resolved))
Exemple #3
0
    def test_resolve(self):

        urls = [
            ("http://*****:*****@localhost/blah?yeah=1#ok",
                "http://*****:*****@127.0.0.1/blah?yeah=1#ok",
            ),
            ("http://tarek@localhost/blah", "http://[email protected]/blah"),
        ]

        for url, wanted in urls:
            changed, original, resolved = resolve(url)
            self.assertEqual(changed, wanted,
                             "%s vs %s" % (original, resolved))
Exemple #4
0
 def _dns_lookup(self, url):
     return resolve(url)[0]
Exemple #5
0
 def _dns_lookup(self, url):
     return resolve(url)[0]