mirror of
https://github.com/home-assistant/core.git
synced 2025-11-11 12:00:52 +00:00
Revert "Allow opening sockets in logbook tests" (#155899)
This commit is contained in:
@@ -60,14 +60,9 @@ EMPTY_CONFIG = logbook.CONFIG_SCHEMA({logbook.DOMAIN: {}})
|
|||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
async def hass_(
|
async def hass_(recorder_mock: Recorder, hass: HomeAssistant) -> HomeAssistant:
|
||||||
recorder_mock: Recorder,
|
|
||||||
hass: HomeAssistant,
|
|
||||||
socket_enabled: None, # Needed because logbook depends on the HTTP integration
|
|
||||||
) -> HomeAssistant:
|
|
||||||
"""Set up things to be run when tests are started."""
|
"""Set up things to be run when tests are started."""
|
||||||
assert await async_setup_component(hass, logbook.DOMAIN, EMPTY_CONFIG)
|
assert await async_setup_component(hass, logbook.DOMAIN, EMPTY_CONFIG)
|
||||||
await hass.async_block_till_done()
|
|
||||||
return hass
|
return hass
|
||||||
|
|
||||||
|
|
||||||
@@ -130,10 +125,7 @@ async def test_service_call_create_logbook_entry(hass_: HomeAssistant) -> None:
|
|||||||
assert last_call.data.get(logbook.ATTR_DOMAIN) == "logbook"
|
assert last_call.data.get(logbook.ATTR_DOMAIN) == "logbook"
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.usefixtures(
|
@pytest.mark.usefixtures("recorder_mock")
|
||||||
"recorder_mock",
|
|
||||||
"socket_enabled", # Needed because logbook depends on the HTTP integration
|
|
||||||
)
|
|
||||||
async def test_service_call_create_logbook_entry_invalid_entity_id(
|
async def test_service_call_create_logbook_entry_invalid_entity_id(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
) -> None:
|
) -> None:
|
||||||
@@ -2974,10 +2966,7 @@ async def test_get_events_with_context_state(
|
|||||||
assert "context_event_type" not in results[3]
|
assert "context_event_type" not in results[3]
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.usefixtures(
|
@pytest.mark.usefixtures("recorder_mock")
|
||||||
"recorder_mock",
|
|
||||||
"socket_enabled", # Needed because logbook depends on the HTTP integration
|
|
||||||
)
|
|
||||||
async def test_logbook_with_empty_config(hass: HomeAssistant) -> None:
|
async def test_logbook_with_empty_config(hass: HomeAssistant) -> None:
|
||||||
"""Test we handle a empty configuration."""
|
"""Test we handle a empty configuration."""
|
||||||
assert await async_setup_component(
|
assert await async_setup_component(
|
||||||
@@ -2991,10 +2980,7 @@ async def test_logbook_with_empty_config(hass: HomeAssistant) -> None:
|
|||||||
await hass.async_block_till_done()
|
await hass.async_block_till_done()
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.usefixtures(
|
@pytest.mark.usefixtures("recorder_mock")
|
||||||
"recorder_mock",
|
|
||||||
"socket_enabled", # Needed because logbook depends on the HTTP integration
|
|
||||||
)
|
|
||||||
async def test_logbook_with_non_iterable_entity_filter(hass: HomeAssistant) -> None:
|
async def test_logbook_with_non_iterable_entity_filter(hass: HomeAssistant) -> None:
|
||||||
"""Test we handle a non-iterable entity filter."""
|
"""Test we handle a non-iterable entity filter."""
|
||||||
assert await async_setup_component(
|
assert await async_setup_component(
|
||||||
|
|||||||
Reference in New Issue
Block a user