mirror of
https://github.com/httpie/cli.git
synced 2025-08-17 19:21:06 +02:00
Run tests against both HTTP and HTTPS
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.
This commit is contained in:
14
tests/conftest.py
Normal file
14
tests/conftest.py
Normal file
@ -0,0 +1,14 @@
|
||||
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
|
Reference in New Issue
Block a user