MCPcopy
hub / github.com/httpie/cli / pyopenssl_inject

Function pyopenssl_inject

tests/conftest.py:84–96  ·  view source on GitHub ↗

Injects `pyOpenSSL` module to make sure `requests` will use it.

()

Source from the content-addressed store, hash-verified

82
83@pytest.fixture(autouse=True, scope='session')
84def pyopenssl_inject():
85 """
86 Injects `pyOpenSSL` module to make sure `requests` will use it.
87 <https://github.com/psf/requests/pull/5443#issuecomment-645740394>
88 """
89 if IS_PYOPENSSL:
90 try:
91 import urllib3.contrib.pyopenssl
92 urllib3.contrib.pyopenssl.inject_into_urllib3()
93 except ModuleNotFoundError:
94 pytest.fail('Missing "pyopenssl" module.')
95
96 yield

Callers

nothing calls this directly

Calls 1

failMethod · 0.80

Tested by

no test coverage detected