mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 10:17:09 +00:00
Improve frame helper tests (#139821)
This commit is contained in:
parent
2a11c413c7
commit
09561aeb39
@ -449,11 +449,18 @@ async def test_report(
|
|||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
("behavior", "integration_domain", "source", "logs_again"),
|
(
|
||||||
|
"behavior",
|
||||||
|
"integration_domain",
|
||||||
|
"integration_frame_path",
|
||||||
|
"source",
|
||||||
|
"logs_again",
|
||||||
|
),
|
||||||
[
|
[
|
||||||
pytest.param(
|
pytest.param(
|
||||||
"core_behavior",
|
"core_behavior",
|
||||||
None,
|
None,
|
||||||
|
"homeassistant",
|
||||||
"code that",
|
"code that",
|
||||||
True,
|
True,
|
||||||
id="core",
|
id="core",
|
||||||
@ -461,6 +468,7 @@ async def test_report(
|
|||||||
pytest.param(
|
pytest.param(
|
||||||
"core_behavior",
|
"core_behavior",
|
||||||
"unknown_integration",
|
"unknown_integration",
|
||||||
|
"homeassistant",
|
||||||
"code that",
|
"code that",
|
||||||
True,
|
True,
|
||||||
id="unknown integration",
|
id="unknown integration",
|
||||||
@ -468,6 +476,7 @@ async def test_report(
|
|||||||
pytest.param(
|
pytest.param(
|
||||||
"core_integration_behavior",
|
"core_integration_behavior",
|
||||||
"sensor",
|
"sensor",
|
||||||
|
"homeassistant",
|
||||||
"that integration 'sensor'",
|
"that integration 'sensor'",
|
||||||
False,
|
False,
|
||||||
id="core integration",
|
id="core integration",
|
||||||
@ -475,13 +484,32 @@ async def test_report(
|
|||||||
pytest.param(
|
pytest.param(
|
||||||
"custom_integration_behavior",
|
"custom_integration_behavior",
|
||||||
"test_package",
|
"test_package",
|
||||||
|
"homeassistant",
|
||||||
"that custom integration 'test_package'",
|
"that custom integration 'test_package'",
|
||||||
False,
|
False,
|
||||||
id="custom integration",
|
id="custom integration",
|
||||||
),
|
),
|
||||||
|
# Assert integration found in stack frame has priority over integration_domain
|
||||||
|
pytest.param(
|
||||||
|
"core_integration_behavior",
|
||||||
|
"sensor",
|
||||||
|
"homeassistant/components/hue",
|
||||||
|
"that integration 'hue'",
|
||||||
|
False,
|
||||||
|
id="core integration",
|
||||||
|
),
|
||||||
|
# Assert integration found in stack frame has priority over integration_domain
|
||||||
|
pytest.param(
|
||||||
|
"custom_integration_behavior",
|
||||||
|
"test_package",
|
||||||
|
"custom_components/hue",
|
||||||
|
"that custom integration 'hue'",
|
||||||
|
False,
|
||||||
|
id="custom integration",
|
||||||
|
),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
@pytest.mark.usefixtures("enable_custom_integrations")
|
@pytest.mark.usefixtures("enable_custom_integrations", "mock_integration_frame")
|
||||||
async def test_report_integration_domain(
|
async def test_report_integration_domain(
|
||||||
hass: HomeAssistant,
|
hass: HomeAssistant,
|
||||||
caplog: pytest.LogCaptureFixture,
|
caplog: pytest.LogCaptureFixture,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user