Skip to content

Commit cd66e33

Browse files
committed
Address failing tests by fixing test setup
1 parent 9d32d31 commit cd66e33

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tests/test_init.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ async def test_setup_unload_and_reload_entry(hass: HomeAssistant, bypass_get_dat
2222
# Set up the entry and assert that the values set during setup are where we expect
2323
# them to be. Because we have a mock coordinator, none of the values is actually
2424
# filled in.
25+
await hass.config_entries.async_setup(config_entry.entry_id)
2526
assert await async_setup_entry(hass, config_entry)
2627
assert DOMAIN in hass.data and config_entry.entry_id in hass.data[DOMAIN]
2728

@@ -53,6 +54,7 @@ async def test_setup_entry_existing_domain(hass: HomeAssistant, bypass_get_data)
5354
config_entry = MockConfigEntry(domain=DOMAIN, data=MOCK_CONFIG, entry_id="test")
5455
config_entry.add_to_hass(hass)
5556

57+
await hass.config_entries.async_setup(config_entry.entry_id)
5658
assert await async_setup_entry(hass, config_entry)
5759
assert DOMAIN in hass.data and config_entry.entry_id in hass.data[DOMAIN]
5860
assert "existing_entry" in hass.data[DOMAIN]
@@ -63,6 +65,7 @@ async def test_unload_entry_failed(hass: HomeAssistant, bypass_get_data):
6365
config_entry = MockConfigEntry(domain=DOMAIN, data=MOCK_CONFIG, entry_id="test")
6466
config_entry.add_to_hass(hass)
6567

68+
await hass.config_entries.async_setup(config_entry.entry_id)
6669
assert await async_setup_entry(hass, config_entry)
6770

6871
with patch(

0 commit comments

Comments
 (0)