mirror of
https://github.com/httpie/cli.git
synced 2024-11-14 20:04:55 +01:00
a6ebc44a48
Some of the tests now use the `httpbin_both` fixture from pytest-httpbin. Also, made httpbin's CA trusted by default and added `httpbin_secure_untrusted` fixture to allow overriding that for particular tests.
15 lines
413 B
Python
15 lines
413 B
Python
import pytest
|
|
from pytest_httpbin.plugin import httpbin_ca_bundle
|
|
|
|
|
|
# Make httpbin's CA trusted by default
|
|
pytest.fixture(autouse=True)(httpbin_ca_bundle)
|
|
|
|
|
|
@pytest.fixture(scope='function')
|
|
def httpbin_secure_untrusted(monkeypatch, httpbin_secure):
|
|
"""Like the `httpbin_secure` fixture, but without the
|
|
make-CA-trusted-by-default"""
|
|
monkeypatch.delenv('REQUESTS_CA_BUNDLE')
|
|
return httpbin_secure
|