mirror of
https://github.com/esphome/esphome.git
synced 2026-10-07 03:16:37 +00:00
fix component tests to match configure_entity codegen
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
42fa6ef818
commit
c0873973c1
@@ -25,9 +25,9 @@ def test_text_sensor_sets_mandatory_fields(generate_main):
|
||||
main_cpp = generate_main("tests/component_tests/text_sensor/test_text_sensor.yaml")
|
||||
|
||||
# Then
|
||||
assert 'ts_1->set_name("Template Text Sensor 1",' in main_cpp
|
||||
assert 'ts_2->set_name("Template Text Sensor 2",' in main_cpp
|
||||
assert 'ts_3->set_name("Template Text Sensor 3",' in main_cpp
|
||||
assert 'ts_1->configure_entity("Template Text Sensor 1",' in main_cpp
|
||||
assert 'ts_2->configure_entity("Template Text Sensor 2",' in main_cpp
|
||||
assert 'ts_3->configure_entity("Template Text Sensor 3",' in main_cpp
|
||||
|
||||
|
||||
def test_text_sensor_config_value_internal_set(generate_main):
|
||||
@@ -54,5 +54,5 @@ def test_text_sensor_device_class_set(generate_main):
|
||||
main_cpp = generate_main("tests/component_tests/text_sensor/test_text_sensor.yaml")
|
||||
|
||||
# Then
|
||||
assert "ts_2->set_entity_strings(" in main_cpp
|
||||
assert "ts_3->set_entity_strings(" in main_cpp
|
||||
assert "ts_2->configure_entity(" in main_cpp
|
||||
assert "ts_3->configure_entity(" in main_cpp
|
||||
|
||||
Reference in New Issue
Block a user