mirror of
https://github.com/home-assistant/core.git
synced 2025-11-27 03:28:04 +00:00
Enable RUF059 and fix violations (#152071)
This commit is contained in:
committed by
GitHub
parent
46c38f185c
commit
e3c0cfd1e2
@@ -654,14 +654,14 @@ async def test_shared_context(hass: HomeAssistant) -> None:
|
||||
assert event_mock.call_count == 1
|
||||
assert run_mock.call_count == 1
|
||||
|
||||
args, kwargs = run_mock.call_args
|
||||
args, _kwargs = run_mock.call_args
|
||||
assert args[0].context == context
|
||||
# Ensure event data has all attributes set
|
||||
assert args[0].data.get(ATTR_NAME) == "test"
|
||||
assert args[0].data.get(ATTR_ENTITY_ID) == "script.test"
|
||||
|
||||
# Ensure context carries through the event
|
||||
args, kwargs = event_mock.call_args
|
||||
args, _kwargs = event_mock.call_args
|
||||
assert args[0].context == context
|
||||
|
||||
# Ensure the script state shares the same context
|
||||
|
||||
Reference in New Issue
Block a user