Skip to content

Commit

Permalink
Run formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jul 30, 2022
1 parent 0039adc commit 62a993c
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions tests/test_init.py
@@ -1,9 +1,15 @@
from homeassistant.components import input_boolean, light
from homeassistant.config_entries import ConfigEntryState
from homeassistant.const import (
CONF_ENTITY_ID,
CONF_NAME,
CONF_UNIQUE_ID,
STATE_UNAVAILABLE,
)
from homeassistant.core import HomeAssistant
from homeassistant.const import CONF_ENTITY_ID, CONF_NAME, CONF_UNIQUE_ID, STATE_UNAVAILABLE
from homeassistant.setup import async_setup_component
from homeassistant.helpers.entity_registry import EntityRegistry
from homeassistant.config_entries import ConfigEntryState
from homeassistant.setup import async_setup_component
from pytest_homeassistant_custom_component.common import MockConfigEntry

from custom_components.powercalc import create_domain_groups
from custom_components.powercalc.const import (
Expand All @@ -27,7 +33,6 @@
run_powercalc_setup_yaml_config,
)

from pytest_homeassistant_custom_component.common import MockConfigEntry

async def test_autodiscovery(hass: HomeAssistant):
"""Test that models are automatically discovered and power sensors created"""
Expand Down Expand Up @@ -100,6 +105,7 @@ async def test_domain_groups(hass: HomeAssistant):

assert not hass.states.get("sensor.all_light_power")


async def test_unload_entry(hass: HomeAssistant, entity_reg: EntityRegistry):
unique_id = "98493943242"
entry = MockConfigEntry(
Expand All @@ -109,9 +115,7 @@ async def test_unload_entry(hass: HomeAssistant, entity_reg: EntityRegistry):
CONF_UNIQUE_ID: unique_id,
CONF_NAME: "testentry",
CONF_ENTITY_ID: DUMMY_ENTITY_ID,
CONF_FIXED: {
CONF_POWER: 50
}
CONF_FIXED: {CONF_POWER: 50},
},
unique_id=unique_id,
)
Expand All @@ -128,4 +132,4 @@ async def test_unload_entry(hass: HomeAssistant, entity_reg: EntityRegistry):
assert entry.state is ConfigEntryState.NOT_LOADED

assert not hass.states.get("sensor.testentry_power")
assert not entity_reg.async_get("sensor.testentry_power")
assert not entity_reg.async_get("sensor.testentry_power")

0 comments on commit 62a993c

Please sign in to comment.