Fix discovery cli to print devices not printed during discovery timeout (#670)

* Fix discovery cli to print devices not printed during discovery

* Fix tests

* Fix print exceptions not being propagated

* Fix tests

* Reduce test discover_send time

* Simplify wait logic

* Add tests

* Remove sleep loop and make auth failed a list
This commit is contained in:
Steven B
2024-02-05 17:53:09 +00:00
committed by GitHub
parent 0d119e63d0
commit 215b8d4e4f
5 changed files with 142 additions and 63 deletions

View File

@@ -508,7 +508,7 @@ def discovery_mock(all_fixture_data, mocker):
login_version,
)
def mock_discover(self):
async def mock_discover(self):
port = (
dm.port_override
if dm.port_override and dm.discovery_port != 20002
@@ -561,7 +561,7 @@ def unsupported_device_info(request, mocker):
discovery_data = request.param
host = "127.0.0.1"
def mock_discover(self):
async def mock_discover(self):
if discovery_data:
data = (
b"\x02\x00\x00\x01\x01[\x00\x00\x00\x00\x00\x00W\xcev\xf8"