Make discovery on unsupported devices less noisy (#1291)

This commit is contained in:
Teemu R.
2024-11-21 19:22:54 +01:00
committed by GitHub
parent 5221fc07ca
commit f2ba23301a
4 changed files with 32 additions and 7 deletions

View File

@@ -195,6 +195,6 @@ async def test_device_types(dev: Device):
async def test_device_class_from_unknown_family(caplog):
"""Verify that unknown SMART devices yield a warning and fallback to SmartDevice."""
dummy_name = "SMART.foo"
with caplog.at_level(logging.WARNING):
with caplog.at_level(logging.DEBUG):
assert get_device_class_from_family(dummy_name, https=False) == SmartDevice
assert f"Unknown SMART device with {dummy_name}" in caplog.text