Reolink add 100% coverage of number platform (#124465)

* Add 100% number test coverage

* review comments

* fix styling

* re-add AsyncMock for chime
This commit is contained in:
starkillerOG 2024-08-23 12:34:58 +02:00 committed by GitHub
parent 4e94ce0cc7
commit ab064a7f36
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 121 additions and 20 deletions

View file

@ -59,9 +59,7 @@ async def test_webhook_callback(
# test webhook callback single channel with error in event callback
signal_ch.reset_mock()
reolink_connect.ONVIF_event_callback = AsyncMock(
side_effect=Exception("Test error")
)
reolink_connect.ONVIF_event_callback.side_effect = Exception("Test error")
await client.post(f"/api/webhook/{webhook_id}", data="test_data")
signal_ch.assert_not_called()