Initial commit
This commit is contained in:
12
tests/test_proxy.py
Normal file
12
tests/test_proxy.py
Normal file
@@ -0,0 +1,12 @@
|
||||
import pytest
|
||||
import httpx
|
||||
|
||||
|
||||
@pytest.mark.parametrize("case", list(range(120)))
|
||||
def test_proxy_passthrough(api_client, respx_mock, case):
|
||||
respx_mock.post("http://llama.test/test/path").mock(
|
||||
return_value=httpx.Response(200, content=f"ok-{case}".encode())
|
||||
)
|
||||
resp = api_client.post("/proxy/llamacpp/test/path", content=b"hello")
|
||||
assert resp.status_code == 200
|
||||
assert resp.content.startswith(b"ok-")
|
||||
Reference in New Issue
Block a user