Skip to content

Commit 3b57cab

Browse files
authored
Revert "Allow opening sockets in logbook tests" (#155899)
1 parent 9674676 commit 3b57cab

File tree

1 file changed

+4
-18
lines changed

1 file changed

+4
-18
lines changed

tests/components/logbook/test_init.py

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,9 @@
6060

6161

6262
@pytest.fixture
63-
async def hass_(
64-
recorder_mock: Recorder,
65-
hass: HomeAssistant,
66-
socket_enabled: None, # Needed because logbook depends on the HTTP integration
67-
) -> HomeAssistant:
63+
async def hass_(recorder_mock: Recorder, hass: HomeAssistant) -> HomeAssistant:
6864
"""Set up things to be run when tests are started."""
6965
assert await async_setup_component(hass, logbook.DOMAIN, EMPTY_CONFIG)
70-
await hass.async_block_till_done()
7166
return hass
7267

7368

@@ -130,10 +125,7 @@ async def test_service_call_create_logbook_entry(hass_: HomeAssistant) -> None:
130125
assert last_call.data.get(logbook.ATTR_DOMAIN) == "logbook"
131126

132127

133-
@pytest.mark.usefixtures(
134-
"recorder_mock",
135-
"socket_enabled", # Needed because logbook depends on the HTTP integration
136-
)
128+
@pytest.mark.usefixtures("recorder_mock")
137129
async def test_service_call_create_logbook_entry_invalid_entity_id(
138130
hass: HomeAssistant,
139131
) -> None:
@@ -2974,10 +2966,7 @@ async def test_get_events_with_context_state(
29742966
assert "context_event_type" not in results[3]
29752967

29762968

2977-
@pytest.mark.usefixtures(
2978-
"recorder_mock",
2979-
"socket_enabled", # Needed because logbook depends on the HTTP integration
2980-
)
2969+
@pytest.mark.usefixtures("recorder_mock")
29812970
async def test_logbook_with_empty_config(hass: HomeAssistant) -> None:
29822971
"""Test we handle a empty configuration."""
29832972
assert await async_setup_component(
@@ -2991,10 +2980,7 @@ async def test_logbook_with_empty_config(hass: HomeAssistant) -> None:
29912980
await hass.async_block_till_done()
29922981

29932982

2994-
@pytest.mark.usefixtures(
2995-
"recorder_mock",
2996-
"socket_enabled", # Needed because logbook depends on the HTTP integration
2997-
)
2983+
@pytest.mark.usefixtures("recorder_mock")
29982984
async def test_logbook_with_non_iterable_entity_filter(hass: HomeAssistant) -> None:
29992985
"""Test we handle a non-iterable entity filter."""
30002986
assert await async_setup_component(

0 commit comments

Comments
 (0)