Black
This commit is contained in:
1 parent
da05dfe708
commit
4de97abc3a
2676 files changed
+163166
-140084
No files matched your search
@@ -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
|
||||
Reference in new issue
Block a user