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