mirror of
https://github.com/elisspace/core.git
synced 2026-10-02 15:30:00 +00:00
Fix check config (#28393)
This commit is contained in:
@@ -112,7 +112,17 @@ async def test_install_missing_package(hass):
|
||||
async def test_get_integration_with_requirements(hass):
|
||||
"""Check getting an integration with loaded requirements."""
|
||||
hass.config.skip_pip = False
|
||||
mock_integration(hass, MockModule("test_component", requirements=["hello==1.0.0"]))
|
||||
mock_integration(
|
||||
hass, MockModule("test_component_dep", requirements=["test-comp-dep==1.0.0"])
|
||||
)
|
||||
mock_integration(
|
||||
hass,
|
||||
MockModule(
|
||||
"test_component",
|
||||
requirements=["test-comp==1.0.0"],
|
||||
dependencies=["test_component_dep"],
|
||||
),
|
||||
)
|
||||
|
||||
with patch(
|
||||
"homeassistant.util.package.is_installed", return_value=False
|
||||
@@ -126,8 +136,13 @@ async def test_get_integration_with_requirements(hass):
|
||||
assert integration
|
||||
assert integration.domain == "test_component"
|
||||
|
||||
assert len(mock_is_installed.mock_calls) == 1
|
||||
assert len(mock_inst.mock_calls) == 1
|
||||
assert len(mock_is_installed.mock_calls) == 2
|
||||
assert mock_is_installed.mock_calls[0][1][0] == "test-comp==1.0.0"
|
||||
assert mock_is_installed.mock_calls[1][1][0] == "test-comp-dep==1.0.0"
|
||||
|
||||
assert len(mock_inst.mock_calls) == 2
|
||||
assert mock_inst.mock_calls[0][1][0] == "test-comp==1.0.0"
|
||||
assert mock_inst.mock_calls[1][1][0] == "test-comp-dep==1.0.0"
|
||||
|
||||
|
||||
async def test_install_with_wheels_index(hass):
|
||||
|
||||
Reference in New Issue
Block a user