Skip to content

Commit da5ed4c

Browse files
committed
Set can_send_already_matched_responses for pytest-httpx
1 parent 52f3c26 commit da5ed4c

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

tests/unit/sdk/checks/test_checks.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
from infrahub_sdk import InfrahubClient
44
from infrahub_sdk.checks import InfrahubCheck
55

6+
pytestmark = pytest.mark.httpx_mock(can_send_already_matched_responses=True)
7+
68

79
async def test_class_init():
810
class IFCheckNoQuery(InfrahubCheck):

tests/unit/sdk/conftest.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
if TYPE_CHECKING:
1919
from pytest_httpx import HTTPXMock
2020

21+
pytestmark = pytest.mark.httpx_mock(can_send_already_matched_responses=True)
22+
2123

2224
@dataclass
2325
class BothClients:

tests/unit/sdk/test_client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
from infrahub_sdk.exceptions import NodeNotFoundError
88
from infrahub_sdk.node import InfrahubNode, InfrahubNodeSync
99

10+
pytestmark = pytest.mark.httpx_mock(can_send_already_matched_responses=True)
11+
1012
excluded_methods = ["request_context"]
1113

1214
async_client_methods = [

0 commit comments

Comments
 (0)