-
-
Notifications
You must be signed in to change notification settings - Fork 30.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use snapshot in Axis switch tests (#122680)
- Loading branch information
Showing
2 changed files
with
251 additions
and
65 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,189 @@ | ||
# serializer version: 1 | ||
# name: test_switches_with_port_cgi[root.IOPort.I0.Configurable=yes\nroot.IOPort.I0.Direction=output\nroot.IOPort.I0.Output.Name=Doorbell\nroot.IOPort.I0.Output.Active=closed\nroot.IOPort.I1.Configurable=yes\nroot.IOPort.I1.Direction=output\nroot.IOPort.I1.Output.Name=\nroot.IOPort.I1.Output.Active=open\n][switch.home_doorbell-entry] | ||
EntityRegistryEntrySnapshot({ | ||
'aliases': set({ | ||
}), | ||
'area_id': None, | ||
'capabilities': None, | ||
'config_entry_id': <ANY>, | ||
'device_class': None, | ||
'device_id': <ANY>, | ||
'disabled_by': None, | ||
'domain': 'switch', | ||
'entity_category': <EntityCategory.CONFIG: 'config'>, | ||
'entity_id': 'switch.home_doorbell', | ||
'has_entity_name': True, | ||
'hidden_by': None, | ||
'icon': None, | ||
'id': <ANY>, | ||
'labels': set({ | ||
}), | ||
'name': None, | ||
'options': dict({ | ||
}), | ||
'original_device_class': <SwitchDeviceClass.OUTLET: 'outlet'>, | ||
'original_icon': None, | ||
'original_name': 'Doorbell', | ||
'platform': 'axis', | ||
'previous_unique_id': None, | ||
'supported_features': 0, | ||
'translation_key': None, | ||
'unique_id': '00:40:8c:12:34:56-tns1:Device/Trigger/Relay-0', | ||
'unit_of_measurement': None, | ||
}) | ||
# --- | ||
# name: test_switches_with_port_cgi[root.IOPort.I0.Configurable=yes\nroot.IOPort.I0.Direction=output\nroot.IOPort.I0.Output.Name=Doorbell\nroot.IOPort.I0.Output.Active=closed\nroot.IOPort.I1.Configurable=yes\nroot.IOPort.I1.Direction=output\nroot.IOPort.I1.Output.Name=\nroot.IOPort.I1.Output.Active=open\n][switch.home_doorbell-state] | ||
StateSnapshot({ | ||
'attributes': ReadOnlyDict({ | ||
'device_class': 'outlet', | ||
'friendly_name': 'home Doorbell', | ||
}), | ||
'context': <ANY>, | ||
'entity_id': 'switch.home_doorbell', | ||
'last_changed': <ANY>, | ||
'last_reported': <ANY>, | ||
'last_updated': <ANY>, | ||
'state': 'off', | ||
}) | ||
# --- | ||
# name: test_switches_with_port_cgi[root.IOPort.I0.Configurable=yes\nroot.IOPort.I0.Direction=output\nroot.IOPort.I0.Output.Name=Doorbell\nroot.IOPort.I0.Output.Active=closed\nroot.IOPort.I1.Configurable=yes\nroot.IOPort.I1.Direction=output\nroot.IOPort.I1.Output.Name=\nroot.IOPort.I1.Output.Active=open\n][switch.home_relay_1-entry] | ||
EntityRegistryEntrySnapshot({ | ||
'aliases': set({ | ||
}), | ||
'area_id': None, | ||
'capabilities': None, | ||
'config_entry_id': <ANY>, | ||
'device_class': None, | ||
'device_id': <ANY>, | ||
'disabled_by': None, | ||
'domain': 'switch', | ||
'entity_category': <EntityCategory.CONFIG: 'config'>, | ||
'entity_id': 'switch.home_relay_1', | ||
'has_entity_name': True, | ||
'hidden_by': None, | ||
'icon': None, | ||
'id': <ANY>, | ||
'labels': set({ | ||
}), | ||
'name': None, | ||
'options': dict({ | ||
}), | ||
'original_device_class': <SwitchDeviceClass.OUTLET: 'outlet'>, | ||
'original_icon': None, | ||
'original_name': 'Relay 1', | ||
'platform': 'axis', | ||
'previous_unique_id': None, | ||
'supported_features': 0, | ||
'translation_key': None, | ||
'unique_id': '00:40:8c:12:34:56-tns1:Device/Trigger/Relay-1', | ||
'unit_of_measurement': None, | ||
}) | ||
# --- | ||
# name: test_switches_with_port_cgi[root.IOPort.I0.Configurable=yes\nroot.IOPort.I0.Direction=output\nroot.IOPort.I0.Output.Name=Doorbell\nroot.IOPort.I0.Output.Active=closed\nroot.IOPort.I1.Configurable=yes\nroot.IOPort.I1.Direction=output\nroot.IOPort.I1.Output.Name=\nroot.IOPort.I1.Output.Active=open\n][switch.home_relay_1-state] | ||
StateSnapshot({ | ||
'attributes': ReadOnlyDict({ | ||
'device_class': 'outlet', | ||
'friendly_name': 'home Relay 1', | ||
}), | ||
'context': <ANY>, | ||
'entity_id': 'switch.home_relay_1', | ||
'last_changed': <ANY>, | ||
'last_reported': <ANY>, | ||
'last_updated': <ANY>, | ||
'state': 'on', | ||
}) | ||
# --- | ||
# name: test_switches_with_port_management[port_management_payload0-api_discovery_items0][switch.home_doorbell-entry] | ||
EntityRegistryEntrySnapshot({ | ||
'aliases': set({ | ||
}), | ||
'area_id': None, | ||
'capabilities': None, | ||
'config_entry_id': <ANY>, | ||
'device_class': None, | ||
'device_id': <ANY>, | ||
'disabled_by': None, | ||
'domain': 'switch', | ||
'entity_category': <EntityCategory.CONFIG: 'config'>, | ||
'entity_id': 'switch.home_doorbell', | ||
'has_entity_name': True, | ||
'hidden_by': None, | ||
'icon': None, | ||
'id': <ANY>, | ||
'labels': set({ | ||
}), | ||
'name': None, | ||
'options': dict({ | ||
}), | ||
'original_device_class': <SwitchDeviceClass.OUTLET: 'outlet'>, | ||
'original_icon': None, | ||
'original_name': 'Doorbell', | ||
'platform': 'axis', | ||
'previous_unique_id': None, | ||
'supported_features': 0, | ||
'translation_key': None, | ||
'unique_id': '00:40:8c:12:34:56-tns1:Device/Trigger/Relay-0', | ||
'unit_of_measurement': None, | ||
}) | ||
# --- | ||
# name: test_switches_with_port_management[port_management_payload0-api_discovery_items0][switch.home_doorbell-state] | ||
StateSnapshot({ | ||
'attributes': ReadOnlyDict({ | ||
'device_class': 'outlet', | ||
'friendly_name': 'home Doorbell', | ||
}), | ||
'context': <ANY>, | ||
'entity_id': 'switch.home_doorbell', | ||
'last_changed': <ANY>, | ||
'last_reported': <ANY>, | ||
'last_updated': <ANY>, | ||
'state': 'off', | ||
}) | ||
# --- | ||
# name: test_switches_with_port_management[port_management_payload0-api_discovery_items0][switch.home_relay_1-entry] | ||
EntityRegistryEntrySnapshot({ | ||
'aliases': set({ | ||
}), | ||
'area_id': None, | ||
'capabilities': None, | ||
'config_entry_id': <ANY>, | ||
'device_class': None, | ||
'device_id': <ANY>, | ||
'disabled_by': None, | ||
'domain': 'switch', | ||
'entity_category': <EntityCategory.CONFIG: 'config'>, | ||
'entity_id': 'switch.home_relay_1', | ||
'has_entity_name': True, | ||
'hidden_by': None, | ||
'icon': None, | ||
'id': <ANY>, | ||
'labels': set({ | ||
}), | ||
'name': None, | ||
'options': dict({ | ||
}), | ||
'original_device_class': <SwitchDeviceClass.OUTLET: 'outlet'>, | ||
'original_icon': None, | ||
'original_name': 'Relay 1', | ||
'platform': 'axis', | ||
'previous_unique_id': None, | ||
'supported_features': 0, | ||
'translation_key': None, | ||
'unique_id': '00:40:8c:12:34:56-tns1:Device/Trigger/Relay-1', | ||
'unit_of_measurement': None, | ||
}) | ||
# --- | ||
# name: test_switches_with_port_management[port_management_payload0-api_discovery_items0][switch.home_relay_1-state] | ||
StateSnapshot({ | ||
'attributes': ReadOnlyDict({ | ||
'device_class': 'outlet', | ||
'friendly_name': 'home Relay 1', | ||
}), | ||
'context': <ANY>, | ||
'entity_id': 'switch.home_relay_1', | ||
'last_changed': <ANY>, | ||
'last_reported': <ANY>, | ||
'last_updated': <ANY>, | ||
'state': 'on', | ||
}) | ||
# --- |
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