Black
This commit is contained in:
parent
da05dfe708
commit
4de97abc3a
2676 changed files with 163166 additions and 140084 deletions
|
@ -13,13 +13,13 @@ class TestBinarySensor(unittest.TestCase):
|
|||
"""Test binary sensor state."""
|
||||
sensor = binary_sensor.BinarySensorDevice()
|
||||
assert STATE_OFF == sensor.state
|
||||
with mock.patch('homeassistant.components.binary_sensor.'
|
||||
'BinarySensorDevice.is_on',
|
||||
new=False):
|
||||
assert STATE_OFF == \
|
||||
binary_sensor.BinarySensorDevice().state
|
||||
with mock.patch('homeassistant.components.binary_sensor.'
|
||||
'BinarySensorDevice.is_on',
|
||||
new=True):
|
||||
assert STATE_ON == \
|
||||
binary_sensor.BinarySensorDevice().state
|
||||
with mock.patch(
|
||||
"homeassistant.components.binary_sensor." "BinarySensorDevice.is_on",
|
||||
new=False,
|
||||
):
|
||||
assert STATE_OFF == binary_sensor.BinarySensorDevice().state
|
||||
with mock.patch(
|
||||
"homeassistant.components.binary_sensor." "BinarySensorDevice.is_on",
|
||||
new=True,
|
||||
):
|
||||
assert STATE_ON == binary_sensor.BinarySensorDevice().state
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue