Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(7)  |  Call(4)  |  Derive(0)  |  Import(3)
implement a REST client on top of urllib2

src/p/y/pyogp.lib.client-0.1/pyogp/lib/client/login.py   pyogp.lib.client(Download)
# pyogp
from pyogp.lib.base.exc import LoginError, ParseStartLocError, HTTPError, ResourceError, ResourceNotFound
from pyogp.lib.base.tests.mock_xmlrpc import MockXMLRPC
from pyogp.lib.base.tests.base import MockXMLRPCLogin
from pyogp.lib.base.network.stdlib_client import StdLibClient
    def _init_legacy_login_handler(self, loginuri):
        """ sets up the xmlrpc handler """
 
        # MockXMLRPC is the test handler, retain it
        if type(self.handler) == type(MockXMLRPC(MockXMLRPCLogin(), self.loginuri)):

src/p/y/pyogp.lib.client-0.1/pyogp/lib/client/tests/test_agent.py   pyogp.lib.client(Download)
 
# pyogp tests
from pyogp.lib.base.tests.mock_xmlrpc import MockXMLRPC
from pyogp.lib.base.tests.base import MockXMLRPCLogin, MockAgentDomainLogin
from pyogp.lib.base.network.tests.mockup_client import MockupClient
    def test_agent_legacy_login_via_variables(self):
 
        # override the network client with the mock client pointed at the mock login handler
        self.loginhandler = MockXMLRPC(MockXMLRPCLogin(), self.legacy_loginuri)  
 
    def test_agent_legacy_login_via_params(self):
 
        # override the network client with the mock client pointed at the mock login handler
        self.loginhandler = MockXMLRPC(MockXMLRPCLogin(), self.legacy_loginuri)
 

src/p/y/pyogp.lib.client-0.1/pyogp/lib/client/tests/test_legacy_login.py   pyogp.lib.client(Download)
 
# pyogp tests
from pyogp.lib.base.tests.mock_xmlrpc import MockXMLRPC
from pyogp.lib.base.tests.base import MockXMLRPCLogin
import pyogp.lib.base.tests.config 
 
        # override the network client with the mock client pointed at the mock login handler
        self.loginhandler = MockXMLRPC(MockXMLRPCLogin(), self.legacy_loginuri)
 
    def tearDown(self):