mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 21:06:19 +00:00
Yoda assertion style removed is (#48142)
This commit is contained in:
@@ -140,7 +140,7 @@ async def test_flux_when_switch_is_off(hass, legacy_patchable_time):
|
||||
|
||||
# Verify initial state of light
|
||||
state = hass.states.get(ent1.entity_id)
|
||||
assert STATE_ON == state.state
|
||||
assert state.state == STATE_ON
|
||||
assert state.attributes.get("xy_color") is None
|
||||
assert state.attributes.get("brightness") is None
|
||||
|
||||
@@ -191,7 +191,7 @@ async def test_flux_before_sunrise(hass, legacy_patchable_time):
|
||||
|
||||
# Verify initial state of light
|
||||
state = hass.states.get(ent1.entity_id)
|
||||
assert STATE_ON == state.state
|
||||
assert state.state == STATE_ON
|
||||
assert state.attributes.get("xy_color") is None
|
||||
assert state.attributes.get("brightness") is None
|
||||
|
||||
@@ -250,7 +250,7 @@ async def test_flux_before_sunrise_known_location(hass, legacy_patchable_time):
|
||||
|
||||
# Verify initial state of light
|
||||
state = hass.states.get(ent1.entity_id)
|
||||
assert STATE_ON == state.state
|
||||
assert state.state == STATE_ON
|
||||
assert state.attributes.get("xy_color") is None
|
||||
assert state.attributes.get("brightness") is None
|
||||
|
||||
@@ -309,7 +309,7 @@ async def test_flux_after_sunrise_before_sunset(hass, legacy_patchable_time):
|
||||
|
||||
# Verify initial state of light
|
||||
state = hass.states.get(ent1.entity_id)
|
||||
assert STATE_ON == state.state
|
||||
assert state.state == STATE_ON
|
||||
assert state.attributes.get("xy_color") is None
|
||||
assert state.attributes.get("brightness") is None
|
||||
|
||||
@@ -368,7 +368,7 @@ async def test_flux_after_sunset_before_stop(hass, legacy_patchable_time):
|
||||
|
||||
# Verify initial state of light
|
||||
state = hass.states.get(ent1.entity_id)
|
||||
assert STATE_ON == state.state
|
||||
assert state.state == STATE_ON
|
||||
assert state.attributes.get("xy_color") is None
|
||||
assert state.attributes.get("brightness") is None
|
||||
|
||||
@@ -428,7 +428,7 @@ async def test_flux_after_stop_before_sunrise(hass, legacy_patchable_time):
|
||||
|
||||
# Verify initial state of light
|
||||
state = hass.states.get(ent1.entity_id)
|
||||
assert STATE_ON == state.state
|
||||
assert state.state == STATE_ON
|
||||
assert state.attributes.get("xy_color") is None
|
||||
assert state.attributes.get("brightness") is None
|
||||
|
||||
@@ -487,7 +487,7 @@ async def test_flux_with_custom_start_stop_times(hass, legacy_patchable_time):
|
||||
|
||||
# Verify initial state of light
|
||||
state = hass.states.get(ent1.entity_id)
|
||||
assert STATE_ON == state.state
|
||||
assert state.state == STATE_ON
|
||||
assert state.attributes.get("xy_color") is None
|
||||
assert state.attributes.get("brightness") is None
|
||||
|
||||
@@ -550,7 +550,7 @@ async def test_flux_before_sunrise_stop_next_day(hass, legacy_patchable_time):
|
||||
|
||||
# Verify initial state of light
|
||||
state = hass.states.get(ent1.entity_id)
|
||||
assert STATE_ON == state.state
|
||||
assert state.state == STATE_ON
|
||||
assert state.attributes.get("xy_color") is None
|
||||
assert state.attributes.get("brightness") is None
|
||||
|
||||
@@ -616,7 +616,7 @@ async def test_flux_after_sunrise_before_sunset_stop_next_day(
|
||||
|
||||
# Verify initial state of light
|
||||
state = hass.states.get(ent1.entity_id)
|
||||
assert STATE_ON == state.state
|
||||
assert state.state == STATE_ON
|
||||
assert state.attributes.get("xy_color") is None
|
||||
assert state.attributes.get("brightness") is None
|
||||
|
||||
@@ -682,7 +682,7 @@ async def test_flux_after_sunset_before_midnight_stop_next_day(
|
||||
|
||||
# Verify initial state of light
|
||||
state = hass.states.get(ent1.entity_id)
|
||||
assert STATE_ON == state.state
|
||||
assert state.state == STATE_ON
|
||||
assert state.attributes.get("xy_color") is None
|
||||
assert state.attributes.get("brightness") is None
|
||||
|
||||
@@ -747,7 +747,7 @@ async def test_flux_after_sunset_after_midnight_stop_next_day(
|
||||
|
||||
# Verify initial state of light
|
||||
state = hass.states.get(ent1.entity_id)
|
||||
assert STATE_ON == state.state
|
||||
assert state.state == STATE_ON
|
||||
assert state.attributes.get("xy_color") is None
|
||||
assert state.attributes.get("brightness") is None
|
||||
|
||||
@@ -812,7 +812,7 @@ async def test_flux_after_stop_before_sunrise_stop_next_day(
|
||||
|
||||
# Verify initial state of light
|
||||
state = hass.states.get(ent1.entity_id)
|
||||
assert STATE_ON == state.state
|
||||
assert state.state == STATE_ON
|
||||
assert state.attributes.get("xy_color") is None
|
||||
assert state.attributes.get("brightness") is None
|
||||
|
||||
@@ -872,7 +872,7 @@ async def test_flux_with_custom_colortemps(hass, legacy_patchable_time):
|
||||
|
||||
# Verify initial state of light
|
||||
state = hass.states.get(ent1.entity_id)
|
||||
assert STATE_ON == state.state
|
||||
assert state.state == STATE_ON
|
||||
assert state.attributes.get("xy_color") is None
|
||||
assert state.attributes.get("brightness") is None
|
||||
|
||||
@@ -934,7 +934,7 @@ async def test_flux_with_custom_brightness(hass, legacy_patchable_time):
|
||||
|
||||
# Verify initial state of light
|
||||
state = hass.states.get(ent1.entity_id)
|
||||
assert STATE_ON == state.state
|
||||
assert state.state == STATE_ON
|
||||
assert state.attributes.get("xy_color") is None
|
||||
assert state.attributes.get("brightness") is None
|
||||
|
||||
@@ -1001,17 +1001,17 @@ async def test_flux_with_multiple_lights(hass, legacy_patchable_time):
|
||||
await hass.async_block_till_done()
|
||||
|
||||
state = hass.states.get(ent1.entity_id)
|
||||
assert STATE_ON == state.state
|
||||
assert state.state == STATE_ON
|
||||
assert state.attributes.get("xy_color") is None
|
||||
assert state.attributes.get("brightness") is None
|
||||
|
||||
state = hass.states.get(ent2.entity_id)
|
||||
assert STATE_ON == state.state
|
||||
assert state.state == STATE_ON
|
||||
assert state.attributes.get("xy_color") is None
|
||||
assert state.attributes.get("brightness") is None
|
||||
|
||||
state = hass.states.get(ent3.entity_id)
|
||||
assert STATE_ON == state.state
|
||||
assert state.state == STATE_ON
|
||||
assert state.attributes.get("xy_color") is None
|
||||
assert state.attributes.get("brightness") is None
|
||||
|
||||
@@ -1077,7 +1077,7 @@ async def test_flux_with_mired(hass, legacy_patchable_time):
|
||||
|
||||
# Verify initial state of light
|
||||
state = hass.states.get(ent1.entity_id)
|
||||
assert STATE_ON == state.state
|
||||
assert state.state == STATE_ON
|
||||
assert state.attributes.get("color_temp") is None
|
||||
|
||||
test_time = dt_util.utcnow().replace(hour=8, minute=30, second=0)
|
||||
@@ -1134,7 +1134,7 @@ async def test_flux_with_rgb(hass, legacy_patchable_time):
|
||||
|
||||
# Verify initial state of light
|
||||
state = hass.states.get(ent1.entity_id)
|
||||
assert STATE_ON == state.state
|
||||
assert state.state == STATE_ON
|
||||
assert state.attributes.get("color_temp") is None
|
||||
|
||||
test_time = dt_util.utcnow().replace(hour=8, minute=30, second=0)
|
||||
|
||||
Reference in New Issue
Block a user