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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
33 changed files with 129 additions and 155 deletions

View file

@ -162,7 +162,7 @@ async def test_accessing_forbidden_methods(hass, caplog):
caplog.records.clear()
hass.async_add_job(execute, hass, "test.py", source, {})
await hass.async_block_till_done()
assert "Not allowed to access {}".format(name) in caplog.text
assert f"Not allowed to access {name}" in caplog.text
async def test_iterating(hass):