コード例 #1
0
def test_connection_pooling_200(app):
    responses.add(responses.GET,
                  'http://example.com',
                  json={'status': 'OK'},
                  status=200)
    with app.test_request_context():
        main.connection_pooling(flask.request)
コード例 #2
0
def test_connection_pooling_404(app):
    responses.add(responses.GET,
                  'http://example.com',
                  json={'error': 'not found'},
                  status=404)
    with app.test_request_context():
        with pytest.raises(requests.exceptions.HTTPError):
            main.connection_pooling(flask.request)
コード例 #3
0
def test_connection_pooling_404(app):
    responses.add(responses.GET, 'http://example.com',
                  json={'error': 'not found'}, status=404)
    with app.test_request_context():
        with pytest.raises(requests.exceptions.HTTPError):
            main.connection_pooling(flask.request)
コード例 #4
0
def test_connection_pooling_200(app):
    responses.add(responses.GET, 'http://example.com',
                  json={'status': 'OK'}, status=200)
    with app.test_request_context():
        main.connection_pooling(flask.request)