-
-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(integ_tests): add entity_id to mocked attributes
- Loading branch information
Showing
36 changed files
with
84 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
tests/integ_tests/action-types/arrow_left_double_click_test.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
tests/integ_tests/action-types/arrow_left_quadruple_click_test.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
entity_state_attributes: | ||
supported_features: 191 | ||
entity_state: "off" | ||
fired_actions: | ||
[ | ||
|
2 changes: 0 additions & 2 deletions
2
tests/integ_tests/action-types/arrow_left_quintuple_click_test.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
entity_state_attributes: | ||
supported_features: 191 | ||
entity_state: "off" | ||
fired_actions: | ||
[ | ||
|
2 changes: 0 additions & 2 deletions
2
tests/integ_tests/action-types/arrow_left_sextuple_click_test.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
entity_state_attributes: | ||
supported_features: 191 | ||
entity_state: "off" | ||
fired_actions: | ||
[ | ||
|
2 changes: 0 additions & 2 deletions
2
tests/integ_tests/action-types/arrow_left_triple_click_test.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
entity_state_attributes: | ||
supported_features: 191 | ||
entity_state: "off" | ||
fired_actions: [arrow_right_click] | ||
expected_calls: | ||
- service: my_service | ||
data: | ||
attr1: 42 | ||
attr2: foo | ||
- service: my_service | ||
data: | ||
attr1: 42 | ||
attr2: foo |
2 changes: 0 additions & 2 deletions
2
tests/integ_tests/action-types/brightness_down_click_test.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
entity_state_attributes: | ||
supported_features: 191 | ||
entity_state: "off" | ||
fired_actions: [brightness_up_click] | ||
expected_calls: | ||
- service: light/toggle | ||
data: | ||
entity_id: light.bedroom | ||
- service: light/toggle | ||
data: | ||
entity_id: light.bedroom |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
entity_state_attributes: | ||
supported_features: 191 | ||
entity_state: "off" | ||
fired_actions: [toggle] | ||
expected_calls: | ||
- service: light/toggle | ||
data: | ||
entity_id: light.bedroom | ||
- service: light/toggle | ||
data: | ||
entity_id: light.bedroom |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 8 additions & 10 deletions
18
tests/integ_tests/example_config/example_config_toggle_xycolor_test.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,12 @@ | ||
entity_state_attributes: | ||
supported_features: 191 | ||
entity_state: "off" | ||
fired_actions: [toggle, 1.0, toggle_hold] | ||
expected_calls: | ||
- service: light/toggle | ||
data: | ||
entity_id: light.livingroom | ||
- service: light/turn_on | ||
data: | ||
entity_id: light.livingroom | ||
xy_color: !!python/tuple [0.323, 0.329] | ||
brightness: 255 | ||
- service: light/toggle | ||
data: | ||
entity_id: light.livingroom | ||
- service: light/turn_on | ||
data: | ||
entity_id: light.livingroom | ||
xy_color: !!python/tuple [0.323, 0.329] | ||
brightness: 255 | ||
expected_calls_count: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 4 additions & 5 deletions
9
tests/integ_tests/example_config/toggle_called_twice_test.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
# When the same action is called more than once within 300ms, | ||
# then we ignore the rest of the calls that fall between that time. | ||
entity_state_attributes: | ||
supported_features: 191 | ||
|
||
entity_state: "off" | ||
fired_actions: [toggle, toggle] | ||
expected_calls: | ||
- service: light/toggle | ||
data: | ||
entity_id: light.livingroom | ||
- service: light/toggle | ||
data: | ||
entity_id: light.livingroom |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
entity_state_attributes: | ||
supported_features: 191 | ||
entity_state: "on" | ||
fired_actions: [step_with_on_off_0_43_5] | ||
expected_calls: | ||
- service: my_script | ||
|
||
- service: my_script |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,6 @@ | ||
entity_state_attributes: | ||
supported_features: 191 | ||
entity_state: "on" | ||
fired_actions: [toggle] | ||
expected_calls: | ||
- service: light/toggle | ||
data: | ||
entity_id: light.my_light | ||
|
||
- service: light/toggle | ||
data: | ||
entity_id: light.my_light |
2 changes: 0 additions & 2 deletions
2
tests/integ_tests/muller_licht_deconz/xy_color_from_controller_test.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
entity_state_attributes: | ||
supported_features: 191 | ||
entity_state: "off" | ||
fired_actions: [6002] | ||
extra: | ||
|
3 changes: 1 addition & 2 deletions
3
tests/integ_tests/muller_licht_z2m/xy_color_from_controller_test.yaml.disabled
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
entity_state_attributes: | ||
supported_features: 191 | ||
|
||
entity_state: "off" | ||
fired_actions: ["color_wheel"] | ||
extra: | ||
|
4 changes: 1 addition & 3 deletions
4
tests/integ_tests/multiple_clicks/deconz_event_1000_1click_test.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
entity_state_attributes: | ||
supported_features: 191 | ||
entity_state: "on" | ||
fired_actions: [1000] | ||
expected_calls: | ||
- service: light/toggle | ||
data: | ||
entity_id: light.bedroom | ||
entity_id: light.bedroom |
4 changes: 1 addition & 3 deletions
4
tests/integ_tests/multiple_clicks/deconz_event_1001_1click_test.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
entity_state_attributes: | ||
supported_features: 191 | ||
entity_state: "on" | ||
fired_actions: [1001] | ||
expected_calls: | ||
- service: light/toggle | ||
data: | ||
entity_id: light.bedroom | ||
entity_id: light.bedroom |
4 changes: 1 addition & 3 deletions
4
tests/integ_tests/multiple_clicks/deconz_event_1002_1click_test.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
entity_state_attributes: | ||
supported_features: 191 | ||
entity_state: "on" | ||
fired_actions: [1002] | ||
expected_calls: | ||
- service: fake_service1002 | ||
- service: fake_service1002 |
8 changes: 3 additions & 5 deletions
8
tests/integ_tests/multiple_clicks/deconz_event_1003_1click_test.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,6 @@ | ||
entity_state_attributes: | ||
supported_features: 191 | ||
entity_state: "on" | ||
fired_actions: [1003] | ||
expected_calls: | ||
- service: light/toggle | ||
data: | ||
entity_id: light.bedroom | ||
- service: light/toggle | ||
data: | ||
entity_id: light.bedroom |
4 changes: 1 addition & 3 deletions
4
tests/integ_tests/multiple_clicks/deconz_event_1003_2clicks_test.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
entity_state_attributes: | ||
supported_features: 191 | ||
entity_state: "on" | ||
fired_actions: [1003, 0.05, 1003] | ||
expected_calls: | ||
- service: fake_service1003 | ||
- service: fake_service1003 |
4 changes: 1 addition & 3 deletions
4
tests/integ_tests/multiple_clicks/deconz_event_1003_with_1004_2clicks_test.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
entity_state_attributes: | ||
supported_features: 191 | ||
entity_state: "on" | ||
fired_actions: [1003, 0.05, 1004, 0.05, 1003] | ||
expected_calls: | ||
- service: fake_service1003 | ||
- service: fake_service1003 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
entity_state_attributes: | ||
supported_features: 191 | ||
entity_state: "on" | ||
fired_actions: ["toggle"] | ||
expected_calls: | ||
- service: fake_service1 | ||
- service: fake_service1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
entity_state_attributes: | ||
supported_features: 191 | ||
entity_state: "on" | ||
fired_actions: ["toggle", 0.05, "toggle"] | ||
expected_calls: | ||
- service: fake_service2 | ||
- service: fake_service2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
entity_state_attributes: | ||
supported_features: 191 | ||
entity_state: "on" | ||
fired_actions: ["toggle", 0.05, "toggle", 0.05, "toggle"] | ||
expected_calls: | ||
- service: fake_service3 | ||
- service: fake_service3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
entity_state_attributes: | ||
supported_features: 191 | ||
entity_state: "on" | ||
fired_actions: ["toggle", 0.05, "toggle", 0.05, "toggle", 0.05, "toggle", 0.05, "toggle"] | ||
fired_actions: | ||
["toggle", 0.05, "toggle", 0.05, "toggle", 0.05, "toggle", 0.05, "toggle"] | ||
expected_calls: | ||
- service: fake_service5 | ||
- service: fake_service5 |
23 changes: 19 additions & 4 deletions
23
tests/integ_tests/multiple_clicks/toggle_8_clicks_test.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,21 @@ | ||
entity_state_attributes: | ||
supported_features: 191 | ||
entity_state: "on" | ||
fired_actions: ["toggle", 0.05, "toggle", 0.05, "toggle", 0.05, "toggle", 0.05, "toggle", 0.05, "toggle", 0.05, "toggle", 0.05, "toggle"] | ||
fired_actions: | ||
[ | ||
"toggle", | ||
0.05, | ||
"toggle", | ||
0.05, | ||
"toggle", | ||
0.05, | ||
"toggle", | ||
0.05, | ||
"toggle", | ||
0.05, | ||
"toggle", | ||
0.05, | ||
"toggle", | ||
0.05, | ||
"toggle", | ||
] | ||
expected_calls: | ||
- service: fake_service8 | ||
- service: fake_service8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 4 additions & 7 deletions
11
tests/integ_tests/toggle_full_and_min/toggle_full_brightness_test.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,7 @@ | ||
entity_state_attributes: | ||
supported_features: 191 | ||
entity_state: "on" | ||
fired_actions: [toggle] | ||
expected_calls: | ||
- service: light/toggle | ||
data: | ||
entity_id: light.my_light | ||
brightness: 255 | ||
|
||
- service: light/toggle | ||
data: | ||
entity_id: light.my_light | ||
brightness: 255 |
Oops, something went wrong.