mirror of
https://github.com/home-assistant/core.git
synced 2025-04-24 09:17:53 +00:00
Fix flakey cast discovery stop test (#114605)
https://github.com/home-assistant/core/actions/runs/8515215623/job/23322322954?pr=114602
This commit is contained in:
parent
d2e4f5f36e
commit
ce9d4c8683
@ -453,13 +453,13 @@ async def test_stop_discovery_called_on_stop(
|
||||
"""Test pychromecast.stop_discovery called on shutdown."""
|
||||
# start_discovery should be called with empty config
|
||||
await async_setup_cast(hass, {})
|
||||
await hass.async_block_till_done()
|
||||
await hass.async_block_till_done(wait_background_tasks=True)
|
||||
assert castbrowser_mock.return_value.start_discovery.call_count == 1
|
||||
|
||||
# stop discovery should be called on shutdown
|
||||
hass.bus.async_fire(EVENT_HOMEASSISTANT_STOP)
|
||||
await hass.async_block_till_done()
|
||||
await hass.async_block_till_done()
|
||||
await hass.async_block_till_done(wait_background_tasks=True)
|
||||
await hass.async_block_till_done(wait_background_tasks=True)
|
||||
assert castbrowser_mock.return_value.stop_discovery.call_count == 1
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user