migration from ha-cantegrill repo
This commit is contained in:
58
unit_tests/test_bool.yaml
Normal file
58
unit_tests/test_bool.yaml
Normal file
@@ -0,0 +1,58 @@
|
||||
fake_entities:
|
||||
binary_sensor.true: True
|
||||
binary_sensor.false: False
|
||||
binary_sensor.off: 'off'
|
||||
binary_sensor.on: 'on'
|
||||
sensor.int17: 17
|
||||
sensor.int170: 170
|
||||
sensor.int200: 200
|
||||
sensor.int3: 3
|
||||
sensor.float10: 10.0
|
||||
sensor.float5: 5.0
|
||||
sensor.strNuit: 'Nuit'
|
||||
sensor.strHome: 'home'
|
||||
binary_sensor.nottrue: False
|
||||
|
||||
constants:
|
||||
andtrap: False
|
||||
|
||||
tests:
|
||||
test_1:
|
||||
expected_result: Succeeded
|
||||
conditions: binary_sensor.true or binary_sensor.false
|
||||
|
||||
test_2:
|
||||
expected_result: Failed
|
||||
conditions: binary_sensor.true and binary_sensor.false
|
||||
|
||||
test_3:
|
||||
expected_result: Succeeded
|
||||
conditions: binary_sensor.on or binary_sensor.off
|
||||
|
||||
test_4:
|
||||
expected_result: Failed
|
||||
conditions: binary_sensor.on and binary_sensor.off == False
|
||||
|
||||
test_5:
|
||||
expected_result: Succeeded
|
||||
conditions: binary_sensor.true or binary_sensor.false and binary_sensor.false
|
||||
|
||||
test_6:
|
||||
expected_result: Failed
|
||||
conditions: (binary_sensor.true or binary_sensor.false) and binary_sensor.false
|
||||
|
||||
test_7:
|
||||
expected_result: Succeeded
|
||||
conditions: not binary_sensor.off
|
||||
|
||||
test_8:
|
||||
expected_result: Failed
|
||||
conditions: not binary_sensor.on
|
||||
|
||||
test_9:
|
||||
expected_result : Succeeded
|
||||
conditions: binary_sensor.true == (not binary_sensor.false)
|
||||
|
||||
test_10:
|
||||
conditions: binary_sensor.nottrue == andtrap
|
||||
expected_result: Succeeded
|
||||
Reference in New Issue
Block a user