fix: fix API tool integration test (#19187)
This commit is contained in:
parent
1ca6dbcdc8
commit
bb1d1dc263
4 changed files with 9 additions and 3 deletions
|
|
@ -5,6 +5,8 @@ import httpx
|
|||
import pytest
|
||||
from _pytest.monkeypatch import MonkeyPatch
|
||||
|
||||
from core.helper import ssrf_proxy
|
||||
|
||||
|
||||
class MockedHttp:
|
||||
@staticmethod
|
||||
|
|
@ -29,6 +31,6 @@ class MockedHttp:
|
|||
|
||||
@pytest.fixture
|
||||
def setup_http_mock(request, monkeypatch: MonkeyPatch):
|
||||
monkeypatch.setattr(httpx, "request", MockedHttp.httpx_request)
|
||||
monkeypatch.setattr(ssrf_proxy, "make_request", MockedHttp.httpx_request)
|
||||
yield
|
||||
monkeypatch.undo()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue