mirror of
https://github.com/home-assistant/core.git
synced 2026-04-02 08:26:41 +01:00
14 lines
280 B
Python
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
|