Upgrade wled 0.4.1 (#36091)

This commit is contained in:
Franck Nijhof authored and GitHub committed 2020-06-03 02:29:49 +02:00
1 parent 94a9b364b0
commit d2e6b863b7
8 files changed
+36 -24

No files matched your search

+8 -4
View File
@@ -1,5 +1,7 @@
"""Tests for the WLED integration."""
import json
from homeassistant.components.wled.const import DOMAIN
from homeassistant.const import CONF_HOST, CONF_MAC
from homeassistant.core import HomeAssistant
@@ -17,27 +19,29 @@ async def init_integration(
"""Set up the WLED integration in Home Assistant."""
fixture = "wled/rgb.json" if not rgbw else "wled/rgbw.json"
data = json.loads(load_fixture(fixture))
aioclient_mock.get(
"http://192.168.1.123:80/json/",
text=load_fixture(fixture),
json=data,
headers={"Content-Type": "application/json"},
)
aioclient_mock.post(
"http://192.168.1.123:80/json/state",
json={},
json=data["state"],
headers={"Content-Type": "application/json"},
)
aioclient_mock.get(
"http://192.168.1.123:80/json/info",
json={},
json=data["info"],
headers={"Content-Type": "application/json"},
)
aioclient_mock.get(
"http://192.168.1.123:80/json/state",
json={},
json=data["state"],
headers={"Content-Type": "application/json"},
)