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

@@ -87,11 +87,11 @@ class TestScene(unittest.TestCase):
"scene:\n"
" - name: test\n"
" entities:\n"
" {0}: on\n"
" {1}:\n"
f" {self.light_1.entity_id}: on\n"
f" {self.light_2.entity_id}:\n"
" state: on\n"
" brightness: 100\n"
).format(self.light_1.entity_id, self.light_2.entity_id)
)
with io.StringIO(config) as file:
doc = yaml_loader.yaml.safe_load(file)