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

Adjust google_assistant tests which create devices #98191

Merged
merged 1 commit into from
Aug 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 5 additions & 3 deletions tests/components/google_assistant/test_smart_home.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

from . import BASIC_CONFIG, MockConfig

from tests.common import async_capture_events
from tests.common import MockConfigEntry, async_capture_events

REQ_ID = "ff36a3cc-ec34-11e6-b1a0-64510650abcf"

Expand Down Expand Up @@ -251,10 +251,12 @@ async def test_sync_message(hass: HomeAssistant, registries) -> None:
@pytest.mark.parametrize("area_on_device", [True, False])
async def test_sync_in_area(area_on_device, hass: HomeAssistant, registries) -> None:
"""Test a sync message where room hint comes from area."""
entry = MockConfigEntry()
entry.add_to_hass(hass)
area = registries.area.async_create("Living Room")

device = registries.device.async_get_or_create(
config_entry_id="1234",
config_entry_id=entry.entry_id,
manufacturer="Someone",
model="Some model",
sw_version="Some Version",
Expand Down Expand Up @@ -625,8 +627,8 @@ async def test_execute_times_out(
"""Test an execute command which times out."""
orig_execute_limit = sh.EXECUTE_LIMIT
sh.EXECUTE_LIMIT = 0.02 # Decrease timeout to 20ms
await async_setup_component(hass, "light", {"light": {"platform": "demo"}})
await async_setup_component(hass, "homeassistant", {})
await async_setup_component(hass, "light", {"light": {"platform": "demo"}})
await hass.async_block_till_done()

await hass.services.async_call(
Expand Down