Fix test_install_existing_package (#25627)

homeassistant.util.package.install_package is not
a corutine.
pull/25632/head
Joakim Plate 2019-08-01 16:37:37 +02:00 committed by Andrew Sayre
parent 61c6838fa2
commit 84abb57ebc
1 changed files with 2 additions and 7 deletions

View File

@ -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"]