Exemplo n.º 1
0
def nested_context_managers():
    with get(httpbin('get')):
        assert response.request.method == 'GET'

        with post(httpbin('post')):
            assert response.request.method == 'POST'

        assert response.request.method == 'GET'
Exemplo n.º 2
0
def main(args):
    with get(api('/repos/gsamokovarov/frames.py/contributors')):
        for metadata in response.json:
            print '%(login)s: %(contributions)d commits' % metadata
Exemplo n.º 3
0
def response_proxies_property_descriptors():
    with get(httpbin('get')):
        assert response.ok == True
        assert response.json['url'] == httpbin('get')
Exemplo n.º 4
0
def main(args):
    with get(api('/repos/gsamokovarov/frames.py/contributors')):
        for metadata in response.json:
            print '%(login)s: %(contributions)d commits' % metadata