Fix overriding name in MockTTSEntity (#124639)
* Fix overriding name in MockTTSEntity * Fix
This commit is contained in:
parent
1aa0dbdaf5
commit
f4528b288f
2 changed files with 4 additions and 7 deletions
|
@ -175,10 +175,7 @@ class MockProvider(BaseProvider, Provider):
|
|||
class MockTTSEntity(BaseProvider, TextToSpeechEntity):
|
||||
"""Test speech API provider."""
|
||||
|
||||
@property
|
||||
def name(self) -> str:
|
||||
"""Return the name of the entity."""
|
||||
return "Test"
|
||||
_attr_name = "Test"
|
||||
|
||||
|
||||
class MockTTS(MockPlatform):
|
||||
|
|
|
@ -1852,8 +1852,8 @@ async def test_default_engine_prefer_entity(
|
|||
await mock_config_entry_setup(hass, mock_tts_entity)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
entity_engine = tts.async_resolve_engine(hass, "tts.test")
|
||||
assert entity_engine == "tts.test"
|
||||
entity_engine = tts.async_resolve_engine(hass, "tts.new_test")
|
||||
assert entity_engine == "tts.new_test"
|
||||
provider_engine = tts.async_resolve_engine(hass, "test")
|
||||
assert provider_engine == "test"
|
||||
assert tts.async_default_engine(hass) == "tts.test"
|
||||
assert tts.async_default_engine(hass) == "tts.new_test"
|
||||
|
|
Loading…
Add table
Reference in a new issue