Skip to content

Commit

Permalink
Correct length of the serials in lamarzocco tests (home-assistant#129725
Browse files Browse the repository at this point in the history
)
  • Loading branch information
zweckj authored Nov 3, 2024
1 parent eddab96 commit fbe2774
Show file tree
Hide file tree
Showing 10 changed files with 227 additions and 227 deletions.
8 changes: 4 additions & 4 deletions tests/components/lamarzocco/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@
USER_INPUT = PASSWORD_SELECTION | {CONF_USERNAME: "username"}

SERIAL_DICT = {
MachineModel.GS3_AV: "GS01234",
MachineModel.GS3_MP: "GS01234",
MachineModel.LINEA_MICRA: "MR01234",
MachineModel.LINEA_MINI: "LM01234",
MachineModel.GS3_AV: "GS012345",
MachineModel.GS3_MP: "GS012345",
MachineModel.LINEA_MICRA: "MR012345",
MachineModel.LINEA_MINI: "LM012345",
}

WAKE_UP_SLEEP_ENTRY_IDS = ["Os2OswX", "aXFz5bJ"]
Expand Down
2 changes: 1 addition & 1 deletion tests/components/lamarzocco/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,5 +157,5 @@ def mock_bluetooth(enable_bluetooth: None) -> None:
def mock_ble_device() -> BLEDevice:
"""Return a mock BLE device."""
return BLEDevice(
"00:00:00:00:00:00", "GS_GS01234", details={"path": "path"}, rssi=50
"00:00:00:00:00:00", "GS_GS012345", details={"path": "path"}, rssi=50
)
36 changes: 18 additions & 18 deletions tests/components/lamarzocco/snapshots/test_binary_sensor.ambr
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
# serializer version: 1
# name: test_binary_sensors[GS01234_backflush_active-binary_sensor]
# name: test_binary_sensors[GS012345_backflush_active-binary_sensor]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'running',
'friendly_name': 'GS01234 Backflush active',
'friendly_name': 'GS012345 Backflush active',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.gs01234_backflush_active',
'entity_id': 'binary_sensor.gs012345_backflush_active',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_binary_sensors[GS01234_backflush_active-entry]
# name: test_binary_sensors[GS012345_backflush_active-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
Expand All @@ -25,7 +25,7 @@
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.gs01234_backflush_active',
'entity_id': 'binary_sensor.gs012345_backflush_active',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
Expand All @@ -42,25 +42,25 @@
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'backflush_enabled',
'unique_id': 'GS01234_backflush_enabled',
'unique_id': 'GS012345_backflush_enabled',
'unit_of_measurement': None,
})
# ---
# name: test_binary_sensors[GS01234_brewing_active-binary_sensor]
# name: test_binary_sensors[GS012345_brewing_active-binary_sensor]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'running',
'friendly_name': 'GS01234 Brewing active',
'friendly_name': 'GS012345 Brewing active',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.gs01234_brewing_active',
'entity_id': 'binary_sensor.gs012345_brewing_active',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_binary_sensors[GS01234_brewing_active-entry]
# name: test_binary_sensors[GS012345_brewing_active-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
Expand All @@ -72,7 +72,7 @@
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.gs01234_brewing_active',
'entity_id': 'binary_sensor.gs012345_brewing_active',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
Expand All @@ -89,25 +89,25 @@
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'brew_active',
'unique_id': 'GS01234_brew_active',
'unique_id': 'GS012345_brew_active',
'unit_of_measurement': None,
})
# ---
# name: test_binary_sensors[GS01234_water_tank_empty-binary_sensor]
# name: test_binary_sensors[GS012345_water_tank_empty-binary_sensor]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'problem',
'friendly_name': 'GS01234 Water tank empty',
'friendly_name': 'GS012345 Water tank empty',
}),
'context': <ANY>,
'entity_id': 'binary_sensor.gs01234_water_tank_empty',
'entity_id': 'binary_sensor.gs012345_water_tank_empty',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_binary_sensors[GS01234_water_tank_empty-entry]
# name: test_binary_sensors[GS012345_water_tank_empty-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
Expand All @@ -119,7 +119,7 @@
'disabled_by': None,
'domain': 'binary_sensor',
'entity_category': <EntityCategory.DIAGNOSTIC: 'diagnostic'>,
'entity_id': 'binary_sensor.gs01234_water_tank_empty',
'entity_id': 'binary_sensor.gs012345_water_tank_empty',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
Expand All @@ -136,7 +136,7 @@
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'water_tank',
'unique_id': 'GS01234_water_tank',
'unique_id': 'GS012345_water_tank',
'unit_of_measurement': None,
})
# ---
8 changes: 4 additions & 4 deletions tests/components/lamarzocco/snapshots/test_button.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
# name: test_start_backflush
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'GS01234 Start backflush',
'friendly_name': 'GS012345 Start backflush',
}),
'context': <ANY>,
'entity_id': 'button.gs01234_start_backflush',
'entity_id': 'button.gs012345_start_backflush',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
Expand All @@ -24,7 +24,7 @@
'disabled_by': None,
'domain': 'button',
'entity_category': None,
'entity_id': 'button.gs01234_start_backflush',
'entity_id': 'button.gs012345_start_backflush',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
Expand All @@ -41,7 +41,7 @@
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'start_backflush',
'unique_id': 'GS01234_start_backflush',
'unique_id': 'GS012345_start_backflush',
'unit_of_measurement': None,
})
# ---
46 changes: 23 additions & 23 deletions tests/components/lamarzocco/snapshots/test_calendar.ambr
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# serializer version: 1
# name: test_calendar_edge_cases[start_date0-end_date0]
dict({
'calendar.gs01234_auto_on_off_schedule_axfz5bj': dict({
'calendar.gs012345_auto_on_off_schedule_axfz5bj': dict({
'events': list([
dict({
'description': 'Machine is scheduled to turn on at the start time and off at the end time',
Expand All @@ -15,7 +15,7 @@
# ---
# name: test_calendar_edge_cases[start_date1-end_date1]
dict({
'calendar.gs01234_auto_on_off_schedule_axfz5bj': dict({
'calendar.gs012345_auto_on_off_schedule_axfz5bj': dict({
'events': list([
dict({
'description': 'Machine is scheduled to turn on at the start time and off at the end time',
Expand All @@ -29,7 +29,7 @@
# ---
# name: test_calendar_edge_cases[start_date2-end_date2]
dict({
'calendar.gs01234_auto_on_off_schedule_axfz5bj': dict({
'calendar.gs012345_auto_on_off_schedule_axfz5bj': dict({
'events': list([
dict({
'description': 'Machine is scheduled to turn on at the start time and off at the end time',
Expand All @@ -43,7 +43,7 @@
# ---
# name: test_calendar_edge_cases[start_date3-end_date3]
dict({
'calendar.gs01234_auto_on_off_schedule_axfz5bj': dict({
'calendar.gs012345_auto_on_off_schedule_axfz5bj': dict({
'events': list([
dict({
'description': 'Machine is scheduled to turn on at the start time and off at the end time',
Expand All @@ -57,15 +57,15 @@
# ---
# name: test_calendar_edge_cases[start_date4-end_date4]
dict({
'calendar.gs01234_auto_on_off_schedule_axfz5bj': dict({
'calendar.gs012345_auto_on_off_schedule_axfz5bj': dict({
'events': list([
]),
}),
})
# ---
# name: test_calendar_edge_cases[start_date5-end_date5]
dict({
'calendar.gs01234_auto_on_off_schedule_axfz5bj': dict({
'calendar.gs012345_auto_on_off_schedule_axfz5bj': dict({
'events': list([
dict({
'description': 'Machine is scheduled to turn on at the start time and off at the end time',
Expand All @@ -83,7 +83,7 @@
}),
})
# ---
# name: test_calendar_events[entry.GS01234_auto_on_off_schedule_axfz5bj]
# name: test_calendar_events[entry.GS012345_auto_on_off_schedule_axfz5bj]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
Expand All @@ -95,7 +95,7 @@
'disabled_by': None,
'domain': 'calendar',
'entity_category': None,
'entity_id': 'calendar.gs01234_auto_on_off_schedule_axfz5bj',
'entity_id': 'calendar.gs012345_auto_on_off_schedule_axfz5bj',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
Expand All @@ -112,11 +112,11 @@
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'auto_on_off_schedule',
'unique_id': 'GS01234_auto_on_off_schedule_aXFz5bJ',
'unique_id': 'GS012345_auto_on_off_schedule_aXFz5bJ',
'unit_of_measurement': None,
})
# ---
# name: test_calendar_events[entry.GS01234_auto_on_off_schedule_os2oswx]
# name: test_calendar_events[entry.GS012345_auto_on_off_schedule_os2oswx]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
Expand All @@ -128,7 +128,7 @@
'disabled_by': None,
'domain': 'calendar',
'entity_category': None,
'entity_id': 'calendar.gs01234_auto_on_off_schedule_os2oswx',
'entity_id': 'calendar.gs012345_auto_on_off_schedule_os2oswx',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
Expand All @@ -145,13 +145,13 @@
'previous_unique_id': None,
'supported_features': 0,
'translation_key': 'auto_on_off_schedule',
'unique_id': 'GS01234_auto_on_off_schedule_Os2OswX',
'unique_id': 'GS012345_auto_on_off_schedule_Os2OswX',
'unit_of_measurement': None,
})
# ---
# name: test_calendar_events[events.GS01234_auto_on_off_schedule_axfz5bj]
# name: test_calendar_events[events.GS012345_auto_on_off_schedule_axfz5bj]
dict({
'calendar.gs01234_auto_on_off_schedule_axfz5bj': dict({
'calendar.gs012345_auto_on_off_schedule_axfz5bj': dict({
'events': list([
dict({
'description': 'Machine is scheduled to turn on at the start time and off at the end time',
Expand Down Expand Up @@ -181,9 +181,9 @@
}),
})
# ---
# name: test_calendar_events[events.GS01234_auto_on_off_schedule_os2oswx]
# name: test_calendar_events[events.GS012345_auto_on_off_schedule_os2oswx]
dict({
'calendar.gs01234_auto_on_off_schedule_os2oswx': dict({
'calendar.gs012345_auto_on_off_schedule_os2oswx': dict({
'events': list([
dict({
'description': 'Machine is scheduled to turn on at the start time and off at the end time',
Expand Down Expand Up @@ -327,38 +327,38 @@
}),
})
# ---
# name: test_calendar_events[state.GS01234_auto_on_off_schedule_axfz5bj]
# name: test_calendar_events[state.GS012345_auto_on_off_schedule_axfz5bj]
StateSnapshot({
'attributes': ReadOnlyDict({
'all_day': False,
'description': 'Machine is scheduled to turn on at the start time and off at the end time',
'end_time': '2024-01-14 07:30:00',
'friendly_name': 'GS01234 Auto on/off schedule (aXFz5bJ)',
'friendly_name': 'GS012345 Auto on/off schedule (aXFz5bJ)',
'location': '',
'message': 'Machine My LaMarzocco on',
'start_time': '2024-01-14 07:00:00',
}),
'context': <ANY>,
'entity_id': 'calendar.gs01234_auto_on_off_schedule_axfz5bj',
'entity_id': 'calendar.gs012345_auto_on_off_schedule_axfz5bj',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'off',
})
# ---
# name: test_calendar_events[state.GS01234_auto_on_off_schedule_os2oswx]
# name: test_calendar_events[state.GS012345_auto_on_off_schedule_os2oswx]
StateSnapshot({
'attributes': ReadOnlyDict({
'all_day': False,
'description': 'Machine is scheduled to turn on at the start time and off at the end time',
'end_time': '2024-01-13 00:00:00',
'friendly_name': 'GS01234 Auto on/off schedule (Os2OswX)',
'friendly_name': 'GS012345 Auto on/off schedule (Os2OswX)',
'location': '',
'message': 'Machine My LaMarzocco on',
'start_time': '2024-01-12 22:00:00',
}),
'context': <ANY>,
'entity_id': 'calendar.gs01234_auto_on_off_schedule_os2oswx',
'entity_id': 'calendar.gs012345_auto_on_off_schedule_os2oswx',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
Expand All @@ -367,7 +367,7 @@
# ---
# name: test_no_calendar_events_global_disable
dict({
'calendar.gs01234_auto_on_off_schedule_os2oswx': dict({
'calendar.gs012345_auto_on_off_schedule_os2oswx': dict({
'events': list([
]),
}),
Expand Down
Loading

0 comments on commit fbe2774

Please sign in to comment.