mirror of
https://github.com/home-assistant/core.git
synced 2025-08-05 21:55:10 +02:00
Fix socket usage in Aprs test (#60253)
This commit is contained in:
@@ -327,6 +327,7 @@ def test_setup_scanner():
|
|||||||
|
|
||||||
def test_setup_scanner_timeout():
|
def test_setup_scanner_timeout():
|
||||||
"""Test setup_scanner failure from timeout."""
|
"""Test setup_scanner failure from timeout."""
|
||||||
|
with patch("aprslib.IS.connect", side_effect=TimeoutError):
|
||||||
hass = get_test_home_assistant()
|
hass = get_test_home_assistant()
|
||||||
hass.start()
|
hass.start()
|
||||||
|
|
||||||
@@ -339,7 +340,5 @@ def test_setup_scanner_timeout():
|
|||||||
}
|
}
|
||||||
|
|
||||||
see = Mock()
|
see = Mock()
|
||||||
try:
|
|
||||||
assert not device_tracker.setup_scanner(hass, config, see)
|
assert not device_tracker.setup_scanner(hass, config, see)
|
||||||
finally:
|
|
||||||
hass.stop()
|
hass.stop()
|
||||||
|
Reference in New Issue
Block a user