mirror of
https://github.com/home-assistant/core.git
synced 2025-07-15 17:27:10 +00:00
Fix unnecessary-dunder-call pylint warnings in tests (#119379)
This commit is contained in:
parent
bdf69c2e5b
commit
ea571a6997
@ -1680,7 +1680,7 @@ def import_and_test_deprecated_alias(
|
||||
def help_test_all(module: ModuleType) -> None:
|
||||
"""Test module.__all__ is correctly set."""
|
||||
assert set(module.__all__) == {
|
||||
itm for itm in module.__dir__() if not itm.startswith("_")
|
||||
itm for itm in dir(module) if not itm.startswith("_")
|
||||
}
|
||||
|
||||
|
||||
|
@ -149,6 +149,7 @@ async def test_send_text_command(
|
||||
mock_text_assistant.assert_called_once_with(
|
||||
ExpectedCredentials(), expected_language_code, audio_out=False
|
||||
)
|
||||
# pylint:disable-next=unnecessary-dunder-call
|
||||
mock_text_assistant.assert_has_calls([call().__enter__().assist(command)])
|
||||
|
||||
|
||||
|
@ -50,6 +50,7 @@ async def test_broadcast_no_targets(
|
||||
mock_text_assistant.assert_called_once_with(
|
||||
ExpectedCredentials(), language_code, audio_out=False
|
||||
)
|
||||
# pylint:disable-next=unnecessary-dunder-call
|
||||
mock_text_assistant.assert_has_calls([call().__enter__().assist(expected_command)])
|
||||
|
||||
|
||||
|
@ -108,6 +108,7 @@ async def test_observer_discovery(
|
||||
hass.bus.async_fire(EVENT_HOMEASSISTANT_STOP)
|
||||
await hass.async_block_till_done()
|
||||
|
||||
# pylint:disable-next=unnecessary-dunder-call
|
||||
assert mock_observer.mock_calls == [call.start(), call.__bool__(), call.stop()]
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user