Lines Matching refs:urllib
4 import urllib
84 self.returned_obj = urllib.urlopen("file:%s" % self.pathname)
145 self.assertRaises(ValueError,urllib.urlopen,'./' + self.pathname)
164 proxies = urllib.getproxies_environment()
169 self.assertTrue(urllib.proxy_bypass_environment('anotherdomain.com'))
170 self.assertTrue(urllib.proxy_bypass_environment('anotherdomain.com:8888'))
171 self.assertTrue(urllib.proxy_bypass_environment('newdomain.com:1234'))
176 proxies = urllib.getproxies_environment()
179 proxies = urllib.getproxies_environment()
186 bypass = urllib.proxy_bypass_environment
215 self.assertFalse(urllib.proxy_bypass_environment('localhost'))
216 self.assertFalse(urllib.proxy_bypass_environment('arbitrary'))
219 proxies = urllib.getproxies_environment()
224 self.assertTrue(urllib.proxy_bypass_environment('localhost'))
225 self.assertTrue(urllib.proxy_bypass_environment('noproxy.com:5678'))
226 self.assertTrue(urllib.proxy_bypass_environment('my.proxy:1234'))
227 self.assertFalse(urllib.proxy_bypass_environment('my.proxy'))
228 self.assertFalse(urllib.proxy_bypass_environment('arbitrary'))
232 proxies = urllib.getproxies_environment()
242 fp = urllib.urlopen("http://python.org/")
255 fp = urllib.urlopen(url)
269 self.assertRaises(IOError, urllib.urlopen, "http://python.org/")
285 urllib.urlopen("http://python.org/")
292 for i in range(urllib.FancyURLopener().maxtries):
298 self.assertRaises(IOError, urllib.urlopen,
308 self.assertRaises(IOError, urllib.urlopen, 'http://something')
313 self.assertRaises(IOError, urllib.urlopen,
319 fp = urllib.urlopen(tmp_fileurl)
326 self.assertRaises(IOError, urllib.urlopen, tmp_fileurl)
329 self.assertRaises(IOError, urllib.urlopen,
337 fp = urllib.urlopen("http://user:pass@python.org/")
356 fp = urllib.urlopen(url)
399 return "file://%s" % urllib.pathname2url(os.path.abspath(filePath))
423 result = urllib.urlretrieve("file:%s" % test_support.TESTFN)
433 result = urllib.urlretrieve(self.constructLocalFileUrl(
457 urllib.urlretrieve(self.constructLocalFileUrl(test_support.TESTFN),
466 urllib.urlretrieve(self.constructLocalFileUrl(srcFileName),
480 urllib.urlretrieve(self.constructLocalFileUrl(srcFileName),
494 urllib.urlretrieve(self.constructLocalFileUrl(srcFileName),
519 self.assertRaises(urllib.ContentTooShortError, urllib.urlretrieve,
535 … self.assertRaises(urllib.ContentTooShortError, urllib.urlretrieve, 'http://example.com/')
571 result = urllib.quote(do_not_quote)
574 result = urllib.quote_plus(do_not_quote)
580 self.assertEqual(urllib.quote.func_defaults[0], '/')
585 result = urllib.quote(quote_by_default, safe=quote_by_default)
588 result = urllib.quote_plus(quote_by_default, safe=quote_by_default)
601 result = urllib.quote(char)
605 result = urllib.quote_plus(char)
613 result = urllib.quote(partial_quote)
616 result = urllib.quote_plus(partial_quote)
619 self.assertRaises(TypeError, urllib.quote, None)
624 result = urllib.quote(' ')
627 result = urllib.quote_plus(' ')
632 result = urllib.quote(given)
636 result = urllib.quote_plus(given)
641 self.assertEqual(urllib.quote_plus('alpha+beta gamma'),
643 self.assertEqual(urllib.quote_plus('alpha+beta gamma', '+'),
659 result = urllib.unquote(given)
662 result = urllib.unquote_plus(given)
669 result = urllib.unquote(escape_string)
673 result = urllib.unquote(escape_string)
682 result = urllib.unquote(given)
687 result = urllib.unquote(given)
692 result = urllib.unquote(given)
700 result = urllib.unquote(given)
709 result = urllib.unquote(given)
712 result = urllib.unquote_plus(given)
720 result = urllib.unquote(given)
724 result = urllib.unquote_plus(given)
729 r = urllib.unquote(u'br%C3%BCckner_sapporo_20050930.doc')
748 result = urllib.urlencode(given)
781 result = urllib.urlencode(given)
785 result = urllib.urlencode(given)
791 expect = "sequence=%s" % urllib.quote_plus(str(['1', '2', '3']))
792 result = urllib.urlencode(given)
794 result = urllib.urlencode(given, True)
808 result = urllib.pathname2url(expected_path)
812 result = urllib.url2pathname(expected_url)
821 expect = "needs/%s/here" % urllib.quote("quot=ing")
822 result = urllib.pathname2url(given)
827 result = urllib.url2pathname(result)
832 expect = "%s/using_quote" % urllib.quote("make sure")
833 result = urllib.pathname2url(given)
839 result = urllib.url2pathname(given)
850 result = urllib.url2pathname(url)
856 result = urllib.url2pathname(given)
866 splittype = urllib.splittype
874 splithost = urllib.splithost
903 splituser = urllib.splituser
918 splitpasswd = urllib.splitpasswd
934 splitport = urllib.splitport
945 splitnport = urllib.splitnport
959 splitquery = urllib.splitquery
969 splittag = urllib.splittag
981 splitattr = urllib.splitattr
992 splitvalue = urllib.splitvalue
1000 result = urllib.toBytes(u'http://www.python.org')
1002 self.assertRaises(UnicodeError, urllib.toBytes,
1006 url = urllib.unwrap('<URL:type://host/path>')
1014 class DummyURLopener(urllib.URLopener):