forked from Archives/langchain
Block sockets for unit-tests (#4803)
# Block usage of sockets during unit tests Catch any tests that attempt to use the network.dynamic_agent_tools
parent
f7e3d97b19
commit
c3b6129beb
@ -0,0 +1,9 @@
|
||||
import pytest
|
||||
import pytest_socket
|
||||
import requests
|
||||
|
||||
|
||||
def test_socket_disabled() -> None:
|
||||
"""This test should fail."""
|
||||
with pytest.raises(pytest_socket.SocketBlockedError):
|
||||
requests.get("https://www.example.com")
|
Loading…
Reference in New Issue