Fix warnings in our test suite (#1246)

Co-authored-by: Steven B <51370195+sdb9696@users.noreply.github.com>
This commit is contained in:
Teemu R.
2024-11-13 17:10:06 +01:00
committed by GitHub
parent 157ad8e807
commit a82ee56a27
16 changed files with 197 additions and 155 deletions

View File

@@ -45,10 +45,8 @@ async def test_update_no_device_info(dev: SmartDevice, mocker: MockerFixture):
"get_device_time": {},
}
msg = f"get_device_info not found in {mock_response} for device 127.0.0.123"
with (
mocker.patch.object(dev.protocol, "query", return_value=mock_response),
pytest.raises(KasaException, match=msg),
):
mocker.patch.object(dev.protocol, "query", return_value=mock_response)
with pytest.raises(KasaException, match=msg):
await dev.update()