Also install after_deps (#28453)

This commit is contained in:
Paulus Schoutsen authored and GitHub committed 2019-11-01 17:21:50 -07:00
1 parent 6655b7db2c
commit 50affdf953
2 files changed
+17 -4

No files matched your search

+11 -2
View File
@@ -115,12 +115,19 @@ async def test_get_integration_with_requirements(hass):
mock_integration(
hass, MockModule("test_component_dep", requirements=["test-comp-dep==1.0.0"])
)
mock_integration(
hass,
MockModule(
"test_component_after_dep", requirements=["test-comp-after-dep==1.0.0"]
),
)
mock_integration(
hass,
MockModule(
"test_component",
requirements=["test-comp==1.0.0"],
dependencies=["test_component_dep"],
partial_manifest={"after_dependencies": ["test_component_after_dep"]},
),
)
@@ -136,13 +143,15 @@ async def test_get_integration_with_requirements(hass):
assert integration
assert integration.domain == "test_component"
assert len(mock_is_installed.mock_calls) == 2
assert len(mock_is_installed.mock_calls) == 3
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 mock_is_installed.mock_calls[2][1][0] == "test-comp-after-dep==1.0.0"
assert len(mock_inst.mock_calls) == 2
assert len(mock_inst.mock_calls) == 3
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"
assert mock_inst.mock_calls[2][1][0] == "test-comp-after-dep==1.0.0"
async def test_install_with_wheels_index(hass):