String formatting improvements for tests (#33663)

This commit is contained in:
Franck Nijhof authored and GitHub committed 2020-04-05 00:26:08 +02:00
1 parent 1c25468b21
commit 906385172a
33 files changed
+129 -155

No files matched your search

+3 -6
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()