Require IFTTT to send data as dictionary (#32317)
* Require IFTTT to send data as dictionary * Update logging
This commit is contained in:
1 parent
8e3492d4f5
commit
c6e85cac0b
2 files changed
+20
-3
No files matched your search
@@ -33,3 +33,11 @@ async def test_config_flow_registers_webhook(hass, aiohttp_client):
|
||||
assert len(ifttt_events) == 1
|
||||
assert ifttt_events[0].data["webhook_id"] == webhook_id
|
||||
assert ifttt_events[0].data["hello"] == "ifttt"
|
||||
|
||||
# Invalid JSON
|
||||
await client.post("/api/webhook/{}".format(webhook_id), data="not a dict")
|
||||
assert len(ifttt_events) == 1
|
||||
|
||||
# Not a dict
|
||||
await client.post("/api/webhook/{}".format(webhook_id), json="not a dict")
|
||||
assert len(ifttt_events) == 1
|
||||
Reference in new issue
Block a user