示例#1
0
def httpbin_ca_bundle():
    # original httpbin_ca_bundle fixture only sets REQUESTS_CA_BUNDLE env.
    # This is not suitable for other HTTP clients, so instead, we return
    # path to a valid CA bundle.
    from pytest_httpbin import certs

    return certs.where()
示例#2
0
def httpbin_add_ca_bundle(monkeypatch):
    """
    Make pytest-httpbin's CA trusted by default.

    (Same as `httpbin_ca_bundle`, just auto-used.).

    """
    monkeypatch.setenv('REQUESTS_CA_BUNDLE', certs.where())
示例#3
0
文件: conftest.py 项目: PKRoma/httpie
def httpbin_add_ca_bundle(monkeypatch):
    """
    Make pytest-httpbin's CA trusted by default.

    (Same as `httpbin_ca_bundle`, just auto-used.).

    """
    monkeypatch.setenv('REQUESTS_CA_BUNDLE', certs.where())