Use content type json constant (#40312)

This commit is contained in:
springstan authored and GitHub committed 2020-09-23 20:21:55 +02:00
1 parent 9c1eb78a0f
commit 6a7caad8dc
28 files changed
+170 -153

No files matched your search

+5 -5
View File
@@ -3,7 +3,7 @@
import json
from homeassistant.components.wled.const import DOMAIN
from homeassistant.const import CONF_HOST, CONF_MAC
from homeassistant.const import CONF_HOST, CONF_MAC, CONTENT_TYPE_JSON
from homeassistant.core import HomeAssistant
from tests.common import MockConfigEntry, load_fixture
@@ -24,25 +24,25 @@ async def init_integration(
aioclient_mock.get(
"http://192.168.1.123:80/json/",
json=data,
headers={"Content-Type": "application/json"},
headers={"Content-Type": CONTENT_TYPE_JSON},
)
aioclient_mock.post(
"http://192.168.1.123:80/json/state",
json=data["state"],
headers={"Content-Type": "application/json"},
headers={"Content-Type": CONTENT_TYPE_JSON},
)
aioclient_mock.get(
"http://192.168.1.123:80/json/info",
json=data["info"],
headers={"Content-Type": "application/json"},
headers={"Content-Type": CONTENT_TYPE_JSON},
)
aioclient_mock.get(
"http://192.168.1.123:80/json/state",
json=data["state"],
headers={"Content-Type": "application/json"},
headers={"Content-Type": CONTENT_TYPE_JSON},
)
entry = MockConfigEntry(