Mock Radio Browser entry setup in onboarding tests (#67905)
This commit is contained in:
parent
3dc100e816
commit
a8ad9fc5f4
1 changed files with 5 additions and 1 deletions
|
@ -390,12 +390,16 @@ async def test_onboarding_core_sets_up_radio_browser(hass, hass_storage, hass_cl
|
|||
|
||||
client = await hass_client()
|
||||
|
||||
resp = await client.post("/api/onboarding/core_config")
|
||||
with patch(
|
||||
"homeassistant.components.radio_browser.async_setup_entry", return_value=True
|
||||
) as mock_setup:
|
||||
resp = await client.post("/api/onboarding/core_config")
|
||||
|
||||
assert resp.status == 200
|
||||
|
||||
await hass.async_block_till_done()
|
||||
assert len(hass.config_entries.async_entries("radio_browser")) == 1
|
||||
assert len(mock_setup.mock_calls) == 1
|
||||
|
||||
|
||||
async def test_onboarding_core_sets_up_rpi_power(
|
||||
|
|
Loading…
Add table
Reference in a new issue