1
0
mirror of https://github.com/home-assistant/core.git synced 2026-04-02 00:20:30 +01:00

Patch the correct socket method in SNMP (#167081)

This commit is contained in:
Simone Chemelli
2026-04-01 18:55:53 +02:00
committed by GitHub
parent c077538015
commit 73da736ebb

View File

@@ -7,7 +7,7 @@ import pytest
@pytest.fixture(autouse=True)
def patch_gethostbyname():
"""Patch gethostbyname to avoid DNS lookups in SNMP tests."""
with patch.object(socket, "gethostbyname"):
def patch_getaddrinfo():
"""Patch getaddrinfo to avoid DNS lookups in SNMP tests."""
with patch.object(socket, "getaddrinfo"):
yield