Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add better testing to vacuum platform #112523

Merged
merged 13 commits into from
May 8, 2024
Prev Previous commit
Next Next commit
some of the MR comments
  • Loading branch information
Lash-L committed Mar 6, 2024
commit 33e7209cce32a8fb6296de9b4b12f3e1c0836deb
11 changes: 6 additions & 5 deletions tests/components/vacuum/test_init.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
)
from homeassistant.core import HomeAssistant

from tests.components.vacuum import create_entity
from . import create_entity

from tests.testing_config.custom_components.test import vacuum as VacuumPlatform


Expand All @@ -45,7 +46,7 @@ async def test_state_services(

entity0 = await create_entity(hass, None)

_ = await hass.services.async_call(
await hass.services.async_call(
DOMAIN,
service,
{"entity_id": entity0.entity_id},
Expand All @@ -61,7 +62,7 @@ async def test_fan_speed(hass: HomeAssistant, config_flow_fixture: None) -> None

entity0 = await create_entity(hass, None)

_ = await hass.services.async_call(
await hass.services.async_call(
DOMAIN,
SERVICE_SET_FAN_SPEED,
{"entity_id": entity0.entity_id, **{"fan_speed": "high"}},
Expand Down Expand Up @@ -91,7 +92,7 @@ def locate(self, **kwargs: Any) -> None:
hass, None, MockVacuumWithLocation, **{"calls": calls}
)

_ = await hass.services.async_call(
await hass.services.async_call(
DOMAIN,
SERVICE_LOCATE,
{"entity_id": entity0.entity_id},
Expand Down Expand Up @@ -127,7 +128,7 @@ def send_command(
hass, None, MockVacuumWithLocation, **{"strings": strings}
)

_ = await hass.services.async_call(
await hass.services.async_call(
DOMAIN,
SERVICE_SEND_COMMAND,
{
Expand Down
Loading