Improve SNMP tests and avoid dns lookups (#166604)

This commit is contained in:
Simone Chemelli
2026-03-31 12:54:40 +01:00
committed by GitHub
parent c82cfaf633
commit cb8597d62f
+13
View File
@@ -0,0 +1,13 @@
"""Conftest for SNMP tests."""
import socket
from unittest.mock import patch
import pytest
@pytest.fixture(autouse=True)
def patch_gethostbyname():
"""Patch gethostbyname to avoid DNS lookups in SNMP tests."""
with patch.object(socket, "gethostbyname"):
yield