1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-02 19:32:19 +01:00

Add integration tests for host (#8912)

This commit is contained in:
J. Nick Koston
2025-05-26 21:31:32 -05:00
committed by GitHub
parent 73771d5c50
commit 4ac433fddb
18 changed files with 749 additions and 3 deletions

View File

@@ -0,0 +1,22 @@
"""Basic integration test for Host mode."""
from __future__ import annotations
import pytest
from .types import APIClientConnectedFactory, RunCompiledFunction
@pytest.mark.asyncio
async def test_host_mode_basic(
yaml_config: str,
run_compiled: RunCompiledFunction,
api_client_connected: APIClientConnectedFactory,
) -> None:
"""Test basic Host mode functionality with API connection."""
# Write, compile and run the ESPHome device, then connect to API
async with run_compiled(yaml_config), api_client_connected() as client:
# Verify we can get device info
device_info = await client.device_info()
assert device_info is not None
assert device_info.name == "host-test"