Speedup Reolink tests by using scope="module" (#125215)

* use scope="module"

* Instead of side_effect = None, use reset_mock(side_efffect=True)

* fix tests
This commit is contained in:
starkillerOG 2024-09-23 12:50:40 +02:00 committed by GitHub
parent a9d12608bd
commit 8ef7cae36d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 101 additions and 12 deletions

View file

@ -74,6 +74,8 @@ async def test_floodlight_mode_select(
assert hass.states.get(entity_id).state == STATE_UNKNOWN
reolink_connect.set_whiteled.reset_mock(side_effect=True)
async def test_play_quick_reply_message(
hass: HomeAssistant,
@ -99,6 +101,8 @@ async def test_play_quick_reply_message(
)
reolink_connect.play_quick_reply.assert_called_once()
reolink_connect.quick_reply_dict = MagicMock()
async def test_chime_select(
hass: HomeAssistant,
@ -153,3 +157,5 @@ async def test_chime_select(
await hass.async_block_till_done()
assert hass.states.get(entity_id).state == STATE_UNKNOWN
test_chime.set_tone.reset_mock(side_effect=True)