Python urllib.request.BaseHandler() Examples
The following are 2
code examples of urllib.request.BaseHandler().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
urllib.request
, or try the search function
.
Example #1
Source File: test_init.py From odoorpc with GNU Lesser General Public License v3.0 | 5 votes |
def test_init_opener(self): # Opener opener = build_opener(BaseHandler) odoo = odoorpc.ODOO( self.env['host'], self.env['protocol'], self.env['port'], opener=opener, ) connector = odoo._connector self.assertIs(connector._opener, opener) self.assertIs(connector._proxy_http._opener, opener) self.assertIs(connector._proxy_json._opener, opener)
Example #2
Source File: test_init.py From odoorpc with GNU Lesser General Public License v3.0 | 5 votes |
def test_init_opener(self): # Opener opener = build_opener(BaseHandler) odoo = odoorpc.ODOO( self.env['host'], self.env['protocol'], self.env['port'], opener=opener) connector = odoo._connector self.assertIs(connector._opener, opener) self.assertIs(connector._proxy_http._opener, opener) self.assertIs(connector._proxy_json._opener, opener)