Lines Matching refs:url
43 def urlopen(url, data=None, proxies=None):
44 """urlopen(url [, data]) -> open file-like object"""
54 return opener.open(url)
56 return opener.open(url, data)
209 self.assertEqual(self.returned_obj.url, self.quoted_pathname)
359 url = 'http://docs.python.org/library/urllib.html#OK'
362 fp = urllib.request.urlopen(url)
363 self.assertEqual(fp.geturl(), url)
384 # test suite. They use different url opening codepaths. Plain
387 # above attempts at injection within the url _path_ safe.
410 # test suite. They use different url opening codepaths. Plain
413 # above attempts at injection within the url _path_ safe.
494 msg = "Redirection to url 'file:"
581 url = "http://{}@python.org/".format(userpass)
585 fp = urlopen(url)
591 self.assertNotEqual(fp.geturl(), url)
1552 for url in given:
1553 result = urllib.request.url2pathname(url)
1577 def open_spam(self, url):
1578 return url
1602 url = "http://www.python.org/file.txt"
1605 filename, _ = urllib.request.URLopener().retrieve(url)
1612 def open_local_file(self, url):
1613 return url
1614 for url in ('local_file://example', 'local-file://example'):
1615 self.assertRaises(OSError, urllib.request.urlopen, url)
1616 self.assertRaises(OSError, urllib.request.URLopener().open, url)
1617 self.assertRaises(OSError, urllib.request.URLopener().retrieve, url)
1618 self.assertRaises(OSError, DummyURLopener().open, url)
1619 self.assertRaises(OSError, DummyURLopener().retrieve, url)