1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-04 04:12:23 +01:00

Fix flaky test_api_conditional_memory and improve integration test patterns (#9379)

This commit is contained in:
J. Nick Koston
2025-07-07 18:08:21 -05:00
committed by GitHub
parent 7150f2806f
commit a72905191a
11 changed files with 341 additions and 234 deletions

View File

@@ -51,9 +51,6 @@ async def test_entity_icon(
entity = entity_map[entity_name]
# Check icon field
assert hasattr(entity, "icon"), (
f"{entity_name}: Entity should have icon attribute"
)
assert entity.icon == expected_icon, (
f"{entity_name}: icon mismatch - "
f"expected '{expected_icon}', got '{entity.icon}'"
@@ -67,9 +64,6 @@ async def test_entity_icon(
entity = entity_map[entity_name]
# Check icon field is empty
assert hasattr(entity, "icon"), (
f"{entity_name}: Entity should have icon attribute"
)
assert entity.icon == "", (
f"{entity_name}: icon should be empty string for entities without icons, "
f"got '{entity.icon}'"