1
0
mirror of https://github.com/home-assistant/core.git synced 2026-04-02 08:26:41 +01:00
Files
core/tests/components/snmp/conftest.py
2026-03-31 12:54:40 +01:00

14 lines
280 B
Python

"""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