1
0
mirror of https://github.com/home-assistant/core.git synced 2025-12-24 12:59:34 +00:00

Collection of random (mainly) test improvements (#33733)

This commit is contained in:
Franck Nijhof
2020-04-06 12:51:48 +02:00
committed by GitHub
parent b31284b855
commit 98a2efcbab
33 changed files with 337 additions and 344 deletions

View File

@@ -129,8 +129,8 @@ async def test_reproduce_turn_on(hass):
assert len(calls) > 0
last_call = calls[-1]
assert last_call.domain == "light"
assert SERVICE_TURN_ON == last_call.service
assert "light.test" == last_call.data.get("entity_id")
assert last_call.service == SERVICE_TURN_ON
assert last_call.data.get("entity_id") == "light.test"
async def test_reproduce_turn_off(hass):
@@ -146,8 +146,8 @@ async def test_reproduce_turn_off(hass):
assert len(calls) > 0
last_call = calls[-1]
assert last_call.domain == "light"
assert SERVICE_TURN_OFF == last_call.service
assert "light.test" == last_call.data.get("entity_id")
assert last_call.service == SERVICE_TURN_OFF
assert last_call.data.get("entity_id") == "light.test"
async def test_reproduce_complex_data(hass):
@@ -167,8 +167,8 @@ async def test_reproduce_complex_data(hass):
assert len(calls) > 0
last_call = calls[-1]
assert last_call.domain == "light"
assert SERVICE_TURN_ON == last_call.service
assert complex_data == last_call.data.get("rgb_color")
assert last_call.service == SERVICE_TURN_ON
assert last_call.data.get("rgb_color") == complex_data
async def test_reproduce_bad_state(hass):