Did I find the right examples for you? yes no

All Samples(8)  |  Call(8)  |  Derive(0)  |  Import(0)

src/p/y/python-ironicclient-0.1.4/ironicclient/v1/client.py   python-ironicclient(Download)
    def __init__(self, *args, **kwargs):
        """Initialize a new client for the Ironic v1 API."""
        self.http_client = http.HTTPClient(*args, **kwargs)
        self.chassis = chassis.ChassisManager(self.http_client)
        self.node = node.NodeManager(self.http_client)

src/p/y/python-ironicclient-0.1.4/ironicclient/tests/test_http.py   python-ironicclient(Download)
    def test_url_generation_trailing_slash_in_base(self):
        client = http.HTTPClient('http://localhost/')
        url = client._make_connection_url('/v1/resources')
        self.assertEqual('/v1/resources', url)
 
    def test_url_generation_without_trailing_slash_in_base(self):
        client = http.HTTPClient('http://localhost')
    def test_url_generation_prefix_slash_in_path(self):
        client = http.HTTPClient('http://localhost/')
        url = client._make_connection_url('/v1/resources')
        self.assertEqual('/v1/resources', url)
 
    def test_url_generation_without_prefix_slash_in_path(self):
        client = http.HTTPClient('http://localhost')
                                       version=1,
                                       status=500)
        client = http.HTTPClient('http://localhost/')
        client.get_connection = \
            lambda *a, **kw: utils.FakeConnection(fake_resp)