1
0
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:
Franck Nijhof
2020-04-05 00:26:08 +02:00
committed by GitHub
parent 1c25468b21
commit 906385172a
33 changed files with 129 additions and 155 deletions

View File

@@ -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()