String formatting improvements for tests (2) (#33666)

This commit is contained in:
Franck Nijhof 2020-04-05 00:33:07 +02:00 committed by GitHub
parent 906385172a
commit d7e9959442
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 65 additions and 76 deletions

View file

@ -31,9 +31,7 @@ async def test_config_flow_registers_webhook(hass, aiohttp_client):
hass.bus.async_listen(twilio.RECEIVED_DATA, handle_event)
client = await aiohttp_client(hass.http.app)
await client.post(
"/api/webhook/{}".format(webhook_id), data={"hello": "twilio"}
)
await client.post(f"/api/webhook/{webhook_id}", data={"hello": "twilio"})
assert len(twilio_events) == 1
assert twilio_events[0].data["webhook_id"] == webhook_id