Skip to content

Commit

Permalink
remove unused stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
CM000n committed Nov 24, 2023
1 parent 3974a1f commit 1276f25
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 35 deletions.
39 changes: 5 additions & 34 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,39 +1,10 @@
from typing import Any, Generator

import pytest
from homeassistant.core import HomeAssistant
from homeassistant.helpers.area_registry import AreaRegistry
from homeassistant.helpers.device_registry import DeviceRegistry
from homeassistant.helpers.entity_registry import EntityRegistry
from pytest_homeassistant_custom_component.common import (
mock_area_registry,
mock_device_registry,
mock_registry,
)


@pytest.fixture(autouse=True)
def auto_enable_custom_integrations(enable_custom_integrations: bool) -> None:
def auto_enable_custom_integrations(
enable_custom_integrations: bool,
) -> Generator[Any, Any, Any]:
yield


@pytest.fixture
def enable_custom_integrations(hass: HomeAssistant) -> None:
"""Enable custom integrations defined in the test dir."""
# hass.data.pop(loader.DATA_CUSTOM_COMPONENTS)


@pytest.fixture
def area_reg(hass: HomeAssistant) -> AreaRegistry:
"""Return an empty, loaded, registry."""
return mock_area_registry(hass)


@pytest.fixture
def device_reg(hass: HomeAssistant) -> DeviceRegistry:
"""Return an empty, loaded, registry."""
return mock_device_registry(hass)


@pytest.fixture
def entity_reg(hass: HomeAssistant) -> EntityRegistry:
"""Return an empty, loaded, registry."""
return mock_registry(hass)
2 changes: 1 addition & 1 deletion tests/test_config_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
@pytest.mark.asyncio
async def test_config_form(hass):
# When
await setup.async_setup_component(hass, "persistent_notification", {})
await setup.async_setup_component(hass, domain="persistent_notification", config={})
setup_result = await hass.config_entries.flow.async_init(
DOMAIN, context={"source": config_entries.SOURCE_USER}
)
Expand Down

0 comments on commit 1276f25

Please sign in to comment.