Move ESPHomeManager into its own file (#95870)

* Move ESPHomeManager into its own file

This is not a functional change. This is only a reorganization
ahead of some more test coverage being added so moving tests
around can be avoided later.

* relos

* fixes

* merge a portion of new cover since its small and allows us to remove the __init__ from .coveragerc
This commit is contained in:
J. Nick Koston 2023-07-07 21:19:44 -10:00 committed by GitHub
parent 967c4d13d8
commit e38f55fdb6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 753 additions and 703 deletions

View file

@ -31,3 +31,19 @@ async def test_unique_id_updated_to_mac(
await hass.async_block_till_done()
assert entry.unique_id == "11:22:33:44:55:aa"
async def test_delete_entry(
hass: HomeAssistant, mock_client, mock_zeroconf: None
) -> None:
"""Test we can delete an entry with error."""
entry = MockConfigEntry(
domain=DOMAIN,
data={CONF_HOST: "test.local", CONF_PORT: 6053, CONF_PASSWORD: ""},
unique_id="mock-config-name",
)
entry.add_to_hass(hass)
await hass.config_entries.async_setup(entry.entry_id)
await hass.async_block_till_done()
assert await hass.config_entries.async_remove(entry.entry_id)
await hass.async_block_till_done()