mirror of
https://github.com/home-assistant/core.git
synced 2025-07-18 10:47:10 +00:00
parent
75faee4f25
commit
db5bf8ab23
@ -3,7 +3,7 @@
|
|||||||
"name": "Netatmo",
|
"name": "Netatmo",
|
||||||
"documentation": "https://www.home-assistant.io/integrations/netatmo",
|
"documentation": "https://www.home-assistant.io/integrations/netatmo",
|
||||||
"requirements": [
|
"requirements": [
|
||||||
"pyatmo==5.0.1"
|
"pyatmo==5.1.0"
|
||||||
],
|
],
|
||||||
"after_dependencies": [
|
"after_dependencies": [
|
||||||
"cloud",
|
"cloud",
|
||||||
|
@ -1306,7 +1306,7 @@ pyarlo==0.2.4
|
|||||||
pyatag==0.3.5.3
|
pyatag==0.3.5.3
|
||||||
|
|
||||||
# homeassistant.components.netatmo
|
# homeassistant.components.netatmo
|
||||||
pyatmo==5.0.1
|
pyatmo==5.1.0
|
||||||
|
|
||||||
# homeassistant.components.atome
|
# homeassistant.components.atome
|
||||||
pyatome==0.1.1
|
pyatome==0.1.1
|
||||||
|
@ -731,7 +731,7 @@ pyarlo==0.2.4
|
|||||||
pyatag==0.3.5.3
|
pyatag==0.3.5.3
|
||||||
|
|
||||||
# homeassistant.components.netatmo
|
# homeassistant.components.netatmo
|
||||||
pyatmo==5.0.1
|
pyatmo==5.1.0
|
||||||
|
|
||||||
# homeassistant.components.apple_tv
|
# homeassistant.components.apple_tv
|
||||||
pyatv==0.7.7
|
pyatv==0.7.7
|
||||||
|
@ -7,6 +7,7 @@ from homeassistant.components.webhook import async_handle_webhook
|
|||||||
from homeassistant.util.aiohttp import MockRequest
|
from homeassistant.util.aiohttp import MockRequest
|
||||||
|
|
||||||
from tests.common import load_fixture
|
from tests.common import load_fixture
|
||||||
|
from tests.test_util.aiohttp import AiohttpClientMockResponse
|
||||||
|
|
||||||
CLIENT_ID = "1234"
|
CLIENT_ID = "1234"
|
||||||
CLIENT_SECRET = "5678"
|
CLIENT_SECRET = "5678"
|
||||||
@ -50,7 +51,7 @@ async def fake_post_request(*args, **kwargs):
|
|||||||
if endpoint in "snapshot_720.jpg":
|
if endpoint in "snapshot_720.jpg":
|
||||||
return b"test stream image bytes"
|
return b"test stream image bytes"
|
||||||
|
|
||||||
if endpoint in [
|
elif endpoint in [
|
||||||
"setpersonsaway",
|
"setpersonsaway",
|
||||||
"setpersonshome",
|
"setpersonshome",
|
||||||
"setstate",
|
"setstate",
|
||||||
@ -58,9 +59,16 @@ async def fake_post_request(*args, **kwargs):
|
|||||||
"setthermmode",
|
"setthermmode",
|
||||||
"switchhomeschedule",
|
"switchhomeschedule",
|
||||||
]:
|
]:
|
||||||
return f'{{"{endpoint}": true}}'
|
payload = f'{{"{endpoint}": true}}'
|
||||||
|
|
||||||
return json.loads(load_fixture(f"netatmo/{endpoint}.json"))
|
else:
|
||||||
|
payload = json.loads(load_fixture(f"netatmo/{endpoint}.json"))
|
||||||
|
|
||||||
|
return AiohttpClientMockResponse(
|
||||||
|
method="POST",
|
||||||
|
url=kwargs["url"],
|
||||||
|
json=payload,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
async def fake_post_request_no_data(*args, **kwargs):
|
async def fake_post_request_no_data(*args, **kwargs):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user