1
0
mirror of https://github.com/esphome/esphome.git synced 2025-07-13 02:23:12 +01:00
Files
2025-05-26 21:31:32 -05:00

23 lines
728 B
Python

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