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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user