mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
String formatting improvements for tests (#33663)
This commit is contained in:
@@ -150,19 +150,16 @@ class TestDatadog(unittest.TestCase):
|
||||
mock_client.gauge.assert_has_calls(
|
||||
[
|
||||
mock.call(
|
||||
"ha.sensor.{}".format(attribute),
|
||||
f"ha.sensor.{attribute}",
|
||||
value,
|
||||
sample_rate=1,
|
||||
tags=["entity:{}".format(state.entity_id)],
|
||||
tags=[f"entity:{state.entity_id}"],
|
||||
)
|
||||
]
|
||||
)
|
||||
|
||||
assert mock_client.gauge.call_args == mock.call(
|
||||
"ha.sensor",
|
||||
out,
|
||||
sample_rate=1,
|
||||
tags=["entity:{}".format(state.entity_id)],
|
||||
"ha.sensor", out, sample_rate=1, tags=[f"entity:{state.entity_id}"],
|
||||
)
|
||||
|
||||
mock_client.gauge.reset_mock()
|
||||
|
||||
Reference in New Issue
Block a user