Closed Colin-b closed 3 weeks ago
3.13
should_mock
True
match_files
match_data
match_extensions
non_mocked_hosts option is not available anymore. Use should_mock instead as in the following sample:
non_mocked_hosts
import pytest @pytest.mark.httpx_mock(non_mocked_hosts=["my_local_test_host"]) def test_previous_behavior(httpx_mock): ... @pytest.mark.httpx_mock(should_mock=lambda request: request.url.host not in ["my_local_test_host"]) def test_new_behavior(httpx_mock): ...
Please note that your hosts might need to be prefixed with www. depending on your usage.
www.
Issues 0 New issues 0 Accepted issues
Measures 0 Security Hotspots 0.0% Coverage on New Code 0.0% Duplication on New Code
See analysis details on SonarCloud
Added
3.13
.should_mock
option (callable returning a boolean) is now available, defaulting to always returningTrue
. Refer to documentation for more details.match_files
andmatch_data
parameters. Refer to documentation for more details.match_extensions
parameter. Refer to documentation for more details.Removed
non_mocked_hosts
option is not available anymore. Useshould_mock
instead as in the following sample:Please note that your hosts might need to be prefixed with
www.
depending on your usage.