Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 0 additions & 18 deletions tests/application/test_connect.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,24 +75,6 @@ async def test_probe_unsuccessful_slow1(device, make_znp_server, mocker):
assert not any([t._is_connected for t in znp_server._transports])


@pytest.mark.parametrize("device", FORMED_DEVICES)
async def test_probe_unsuccessful_slow2(device, make_znp_server, mocker):
znp_server = make_znp_server(server_cls=device, shorten_delays=False)

# Don't respond to anything
znp_server._listeners.clear()

mocker.patch("zigpy_znp.zigbee.application.PROBE_TIMEOUT", new=0.1)

assert not (
await ControllerApplication.probe(
conf.SCHEMA_DEVICE({conf.CONF_DEVICE_PATH: znp_server.serial_port})
)
)

assert not any([t._is_connected for t in znp_server._transports])


@pytest.mark.parametrize("device", FORMED_DEVICES)
async def test_probe_successful(device, make_znp_server):
znp_server = make_znp_server(server_cls=device, shorten_delays=False)
Expand Down
9 changes: 0 additions & 9 deletions zigpy_znp/zigbee/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
ZDO_PROFILE = 0x0000

# All of these are in seconds
PROBE_TIMEOUT = 5
STARTUP_TIMEOUT = 5
DATA_CONFIRM_TIMEOUT = 8
EXTENDED_DATA_CONFIRM_TIMEOUT = 30
Expand Down Expand Up @@ -67,14 +66,6 @@ def __init__(self, config: conf.ConfigType):
# Implementation of the core zigpy ControllerApplication methods #
##################################################################

@classmethod
async def probe(cls, device_config):
try:
async with asyncio_timeout(PROBE_TIMEOUT):
return await super().probe(device_config)
except asyncio.TimeoutError:
return False

async def connect(self):
assert self._znp is None

Expand Down