Home
last modified time | relevance | path

Searched refs:urlopen (Results 1 – 25 of 164) sorted by relevance

1234567

/external/python/cpython2/Lib/test/
Dtest_urllibnet.py46 f = _open_with_retry(urllib.urlopen, "http://www.example.com/")
64 def urlopen(self, *args): member in urlopenNetworkTests
65 return _open_with_retry(urllib.urlopen, *args)
69 open_url = self.urlopen("http://www.example.com/")
81 open_url = self.urlopen("http://www.example.com/")
92 open_url = self.urlopen("http://www.example.com/")
105 open_url = self.urlopen(URL)
126 open_url = self.urlopen("http://www.example.com/")
154 urllib.urlopen, "http://sadflkjsasf.i.nvali.d/")
212 response = urllib.urlopen("https://self-signed.pythontest.net", context=context)
Dtest_urllib2_localnet.py309 self.assertTrue(urllib2.urlopen(self.server_url))
320 self.assertRaises(urllib2.HTTPError, urllib2.urlopen, self.server_url)
456 def urlopen(self, url, data=None, **kwargs): member in TestUrlopen
458 f = urllib2.urlopen(url, data, **kwargs)
500 f = urllib2.urlopen('http://localhost:%s/' % handler.port)
516 urllib2.urlopen('http://localhost:%s/weeble' % handler.port)
536 f = urllib2.urlopen('http://localhost:%s/bizarre' % handler.port)
550 f = urllib2.urlopen('http://localhost:%s/bizarre' % handler.port, 'get=with_feeling')
562 data = self.urlopen("https://localhost:%s/bizarre" % handler.port, context=context)
568 data = self.urlopen("https://localhost:%s/bizarre" % handler.port,
[all …]
Dtest_urllib2net.py30 _urlopen_with_retry = _wrap_with_retry_thrice(urllib2.urlopen, urllib2.URLError)
125 self.assertRaises(ValueError, urllib2.urlopen,'./relative_path/to/file')
159 res = urllib2.urlopen(req)
193 req = urllib2.urlopen(URL)
202 urlopen = urllib2.build_opener(*handlers).open
204 urlopen = _wrap_with_retry_thrice(urlopen, urllib2.URLError)
214 f = urlopen(url, req, TIMEOUT)
Dtest_urllib.py84 self.returned_obj = urllib.urlopen("file:%s" % self.pathname)
145 self.assertRaises(ValueError,urllib.urlopen,'./' + self.pathname)
241 fp = urllib.urlopen("http://python.org/")
254 fp = urllib.urlopen(url)
268 self.assertRaises(IOError, urllib.urlopen, "http://python.org/")
284 urllib.urlopen("http://python.org/")
297 self.assertRaises(IOError, urllib.urlopen,
307 self.assertRaises(IOError, urllib.urlopen, 'http://something')
312 self.assertRaises(IOError, urllib.urlopen,
318 fp = urllib.urlopen(tmp_fileurl)
[all …]
/external/python/cpython3/Lib/test/
Dtest_urllib2_localnet.py305 self.assertTrue(urllib.request.urlopen(self.server_url))
313 self.assertRaises(urllib.error.HTTPError, urllib.request.urlopen, self.server_url)
458 def urlopen(self, url, data=None, **kwargs): member in TestUrlopen
460 f = urllib.request.urlopen(url, data, **kwargs)
504 data = self.urlopen("http://localhost:%s/" % handler.port)
519 data = self.urlopen("http://localhost:%s/" % handler.port)
527 self.urlopen("http://localhost:%s/weeble" % handler.port)
540 data = self.urlopen("http://localhost:%s/bizarre" % handler.port)
547 data = self.urlopen("http://localhost:%s/bizarre" % handler.port,
555 data = self.urlopen("https://localhost:%s/bizarre" % handler.port, context=context)
[all …]
Dtest_urllibnet.py27 f = urllib.request.urlopen("http://www.example.com/")
49 def urlopen(self, *args, **kwargs): member in urlopenNetworkTests
52 r = urllib.request.urlopen(*args, **kwargs)
60 with self.urlopen(self.url) as open_url:
69 with self.urlopen(self.url) as open_url:
77 with self.urlopen(self.url) as open_url:
86 with self.urlopen(self.url) as open_url:
138 urllib.request.urlopen("http://{}/".format(bogus_domain))
Dtest_urllib2net.py32 _urlopen_with_retry = _wrap_with_retry_thrice(urllib.request.urlopen,
121 self.assertRaises(ValueError, urllib.request.urlopen,'./relative_path/to/file')
155 res = urllib.request.urlopen(req)
163 res = urllib.request.urlopen(req)
188 with urllib.request.urlopen(URL) as res:
196 req = urllib.request.urlopen(URL)
205 urlopen = urllib.request.build_opener(*handlers).open
207 urlopen = _wrap_with_retry_thrice(urlopen, urllib.error.URLError)
218 f = urlopen(url, req, TIMEOUT)
Dtest_urllib.py36 def urlopen(url, data=None, proxies=None): function
145 self.returned_obj = urlopen("file:%s" % self.pathname)
207 self.assertRaises(ValueError,urllib.request.urlopen,'./' + self.pathname)
303 fp = urlopen("http://python.org/")
316 fp = urllib.request.urlopen(url)
324 resp = urlopen("http://www.python.org")
349 self.assertRaises(OSError, urlopen, "http://python.org/")
365 urlopen("http://python.org/")
378 self.assertRaises(urllib.error.HTTPError, urlopen,
388 self.assertRaises(OSError, urlopen, "http://something")
[all …]
/external/autotest/client/common_lib/cros/fake_device_server/client_lib/
Dcommands.py31 url_h = urllib2.urlopen(request)
42 url_h = urllib2.urlopen(request)
65 url_h = urllib2.urlopen(request)
80 url_h = urllib2.urlopen(request)
Dregistration.py29 url_h = urllib2.urlopen(self.get_url([ticket_id]))
58 url_h = urllib2.urlopen(request)
74 url_h = urllib2.urlopen(request)
85 url_h = urllib2.urlopen(request)
Ddevices.py31 url_h = urllib2.urlopen(request)
39 url_h = urllib2.urlopen(request)
56 url_h = urllib2.urlopen(request)
Dfail_control.py28 url_h = urllib2.urlopen(request)
37 url_h = urllib2.urlopen(request)
Doauth.py28 url_h = urllib2.urlopen(request)
38 url_h = urllib2.urlopen(request)
Doauth_helpers.py40 url_h = urllib2.urlopen(request)
58 url_h = urllib2.urlopen(request)
/external/autotest/server/
Dlab_status_unittest.py127 urllib2.urlopen(mox.IgnoreArg()).AndReturn(
139 urllib2.urlopen(mox.IgnoreArg()).AndRaise(
142 urllib2.urlopen(mox.IgnoreArg()).AndReturn(
154 urllib2.urlopen(mox.IgnoreArg()).AndReturn(
157 urllib2.urlopen(mox.IgnoreArg()).AndReturn(
170 urllib2.urlopen(mox.IgnoreArg()).AndRaise(
184 urllib2.urlopen(mox.IgnoreArg()).AndReturn(
/external/python/futures/
Dcrawl.py9 from urllib2 import urlopen
11 from urllib.request import urlopen
30 return urlopen(url, **kwargs).read()
/external/python/cpython2/Doc/howto/
Durllib2.rst31 the *urlopen* function. This is capable of fetching URLs using a variety of
41 For straightforward situations *urlopen* is very easy to use. But as soon as you
56 response = urllib2.urlopen('http://python.org/')
67 object that specifies the URL you want to fetch. Calling ``urlopen`` with this
75 response = urllib2.urlopen(req)
112 response = urllib2.urlopen(req)
143 >>> data = urllib2.urlopen(full_url)
177 response = urllib2.urlopen(req)
187 *urlopen* raises :exc:`URLError` when it cannot handle a response (though as
205 >>> try: urllib2.urlopen(req)
[all …]
/external/python/cpython2/Doc/library/
Durllib.rst12 Also note that the :func:`urllib.request.urlopen` function in Python 3 is
13 equivalent to :func:`urllib2.urlopen` and that :func:`urllib.urlopen` has
22 Wide Web. In particular, the :func:`urlopen` function is similar to the
39 .. function:: urlopen(url[, data[, proxies[, context]]])
75 HTTP server redirects a client to another URL. The :func:`urlopen` function
89 The :func:`urlopen` function works transparently with proxies which do not
110 In a Mac OS X environment, :func:`urlopen` will retrieve proxy information
123 filehandle = urllib.urlopen(some_url, proxies=proxies)
125 filehandle = urllib.urlopen(some_url, proxies={})
127 filehandle = urllib.urlopen(some_url, proxies=None)
[all …]
/external/toolchain-utils/cwp/interpreter/
Dapp_engine_pull.py58 auth_resp = urllib2.urlopen(auth_req)
151 serv_resp = urllib2.urlopen(serv_req)
198 urllib2.urlopen(serv_req)
214 serv_resp = urllib2.urlopen(serv_req)
/external/python/cpython3/Doc/howto/
Durllib2.rst31 the *urlopen* function. This is capable of fetching URLs using a variety of
41 For straightforward situations *urlopen* is very easy to use. But as soon as you
56 with urllib.request.urlopen('http://python.org/') as response:
74 object that specifies the URL you want to fetch. Calling ``urlopen`` with this
82 with urllib.request.urlopen(req) as response:
120 with urllib.request.urlopen(req) as response:
151 >>> data = urllib.request.urlopen(full_url)
186 with urllib.request.urlopen(req) as response:
196 *urlopen* raises :exc:`URLError` when it cannot handle a response (though as
216 >>> try: urllib.request.urlopen(req)
[all …]
/external/scapy/test/
Dnmap.uts23 from urllib.request import urlopen
25 from urllib2 import urlopen
29 …open('nmap-os-fingerprints', 'wb').write(urlopen('https://raw.githubusercontent.com/nmap/nmap/9efe…
/external/python/cpython2/Lib/distutils/tests/
Dtest_upload.py62 self.old_open = upload_mod.urlopen
63 upload_mod.urlopen = self._urlopen
69 upload_mod.urlopen = self.old_open
/external/autotest/site_utils/
Dset_tree_status.py22 response = urllib.urlopen(CHROMEOS_STATUS_SERVER + '/current?format=raw')
46 urllib.urlopen(CHROMEOS_STATUS_SERVER + '/status', urllib.urlencode(data))
/external/autotest/client/cros/enterprise/
Denterprise_fake_dmserver.py64 if urllib2.urlopen('%stest/ping' % self.server_url).getcode() == 200:
65 urllib2.urlopen('%sconfiguration/test/exit' % self.server_url)
/external/autotest/client/common_lib/cros/
Dchromedriver.py86 urllib2.urlopen('http://localhost:%i/json/new' %
210 urllib2.urlopen(self.url + '/status')
232 urllib2.urlopen(self.url + '/shutdown', timeout=10).close()

1234567