Skip to content
Snippets Groups Projects
Unverified Commit ea571a69 authored by epenet's avatar epenet Committed by GitHub
Browse files

Fix unnecessary-dunder-call pylint warnings in tests (#119379)

parent bdf69c2e
No related branches found
No related tags found
No related merge requests found
......@@ -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()]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment