Fix test_install_existing_package (#25627)
homeassistant.util.package.install_package is not a corutine.pull/25632/head
parent
61c6838fa2
commit
84abb57ebc
|
@ -11,12 +11,7 @@ from homeassistant.requirements import (
|
||||||
_install,
|
_install,
|
||||||
)
|
)
|
||||||
|
|
||||||
from tests.common import (
|
from tests.common import get_test_home_assistant, MockModule, mock_integration
|
||||||
get_test_home_assistant,
|
|
||||||
MockModule,
|
|
||||||
mock_coro,
|
|
||||||
mock_integration,
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
class TestRequirements:
|
class TestRequirements:
|
||||||
|
@ -77,7 +72,7 @@ class TestRequirements:
|
||||||
async def test_install_existing_package(hass):
|
async def test_install_existing_package(hass):
|
||||||
"""Test an install attempt on an existing package."""
|
"""Test an install attempt on an existing package."""
|
||||||
with patch(
|
with patch(
|
||||||
"homeassistant.util.package.install_package", return_value=mock_coro(True)
|
"homeassistant.util.package.install_package", return_value=True
|
||||||
) as mock_inst:
|
) as mock_inst:
|
||||||
assert await async_process_requirements(
|
assert await async_process_requirements(
|
||||||
hass, "test_component", ["hello==1.0.0"]
|
hass, "test_component", ["hello==1.0.0"]
|
||||||
|
|
Loading…
Reference in New Issue