mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-14 17:07:25 +00:00
add test
This commit is contained in:
parent
b07bb53f5b
commit
6f67aacab3
@ -676,6 +676,16 @@ def test_openai_proxy() -> None:
|
|||||||
assert proxy.host == b"localhost"
|
assert proxy.host == b"localhost"
|
||||||
assert proxy.port == 8080
|
assert proxy.port == 8080
|
||||||
|
|
||||||
|
http_async_client = httpx.AsyncClient(proxy="http://localhost:8081")
|
||||||
|
chat_openai = ChatOpenAI(http_async_client=http_async_client)
|
||||||
|
mounts = chat_openai.async_client._client._client._mounts
|
||||||
|
assert len(mounts) == 1
|
||||||
|
for key, value in mounts.items():
|
||||||
|
proxy = value._pool._proxy_url.origin
|
||||||
|
assert proxy.scheme == b"http"
|
||||||
|
assert proxy.host == b"localhost"
|
||||||
|
assert proxy.port == 8081
|
||||||
|
|
||||||
|
|
||||||
def test_openai_response_headers() -> None:
|
def test_openai_response_headers() -> None:
|
||||||
"""Test ChatOpenAI response headers."""
|
"""Test ChatOpenAI response headers."""
|
||||||
|
Loading…
Reference in New Issue
Block a user