Use content type json constant (#40312)
This commit is contained in:
1 parent
9c1eb78a0f
commit
6a7caad8dc
28 files changed
+170
-153
No files matched your search
@@ -1,7 +1,7 @@
|
||||
"""Tests for the Elgato Key Light integration."""
|
||||
|
||||
from homeassistant.components.elgato.const import CONF_SERIAL_NUMBER, DOMAIN
|
||||
from homeassistant.const import CONF_HOST, CONF_PORT
|
||||
from homeassistant.const import CONF_HOST, CONF_PORT, CONTENT_TYPE_JSON
|
||||
from homeassistant.core import HomeAssistant
|
||||
|
||||
from tests.common import MockConfigEntry, load_fixture
|
||||
@@ -18,25 +18,25 @@ async def init_integration(
|
||||
aioclient_mock.get(
|
||||
"http://1.2.3.4:9123/elgato/accessory-info",
|
||||
text=load_fixture("elgato/info.json"),
|
||||
headers={"Content-Type": "application/json"},
|
||||
headers={"Content-Type": CONTENT_TYPE_JSON},
|
||||
)
|
||||
|
||||
aioclient_mock.put(
|
||||
"http://1.2.3.4:9123/elgato/lights",
|
||||
text=load_fixture("elgato/state.json"),
|
||||
headers={"Content-Type": "application/json"},
|
||||
headers={"Content-Type": CONTENT_TYPE_JSON},
|
||||
)
|
||||
|
||||
aioclient_mock.get(
|
||||
"http://1.2.3.4:9123/elgato/lights",
|
||||
text=load_fixture("elgato/state.json"),
|
||||
headers={"Content-Type": "application/json"},
|
||||
headers={"Content-Type": CONTENT_TYPE_JSON},
|
||||
)
|
||||
|
||||
aioclient_mock.get(
|
||||
"http://5.6.7.8:9123/elgato/accessory-info",
|
||||
text=load_fixture("elgato/info.json"),
|
||||
headers={"Content-Type": "application/json"},
|
||||
headers={"Content-Type": CONTENT_TYPE_JSON},
|
||||
)
|
||||
|
||||
entry = MockConfigEntry(
|
||||
|
||||
Reference in new issue
Block a user