Skip to content

Commit

Permalink
Use snake case in matter fixture nodes (#126743)
Browse files Browse the repository at this point in the history
  • Loading branch information
joostlek authored Sep 25, 2024
1 parent 083b586 commit 662a704
Show file tree
Hide file tree
Showing 56 changed files with 144 additions and 144 deletions.
18 changes: 9 additions & 9 deletions tests/components/matter/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ async def integration_fixture(

@pytest.fixture(
params=[
"door-lock",
"smoke-detector",
"air-purifier",
"eve-energy-plug-patched",
"eve-energy-plug",
"door_lock",
"smoke_detector",
"air_purifier",
"eve_energy_plug_patched",
"eve_energy_plug",
]
)
async def matter_devices(
Expand All @@ -91,7 +91,7 @@ async def door_lock_fixture(
hass: HomeAssistant, matter_client: MagicMock
) -> MatterNode:
"""Fixture for a door lock node."""
return await setup_integration_with_node_fixture(hass, "door-lock", matter_client)
return await setup_integration_with_node_fixture(hass, "door_lock", matter_client)


@pytest.fixture(name="smoke_detector")
Expand All @@ -100,7 +100,7 @@ async def smoke_detector_fixture(
) -> MatterNode:
"""Fixture for a smoke detector node."""
return await setup_integration_with_node_fixture(
hass, "smoke-detector", matter_client
hass, "smoke_detector", matter_client
)


Expand All @@ -110,7 +110,7 @@ async def door_lock_with_unbolt_fixture(
) -> MatterNode:
"""Fixture for a door lock node with unbolt feature."""
return await setup_integration_with_node_fixture(
hass, "door-lock-with-unbolt", matter_client
hass, "door_lock_with_unbolt", matter_client
)


Expand All @@ -120,5 +120,5 @@ async def eve_contact_sensor_node_fixture(
) -> MatterNode:
"""Fixture for a contact sensor node."""
return await setup_integration_with_node_fixture(
hass, "eve-contact-sensor", matter_client
hass, "eve_contact_sensor", matter_client
)
32 changes: 16 additions & 16 deletions tests/components/matter/snapshots/test_binary_sensor.ambr
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# serializer version: 1
# name: test_binary_sensors[door-lock-True][binary_sensor.mock_door_lock_battery-entry]
# name: test_binary_sensors[door_lock-True][binary_sensor.mock_door_lock_battery-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
Expand Down Expand Up @@ -32,7 +32,7 @@
'unit_of_measurement': None,
})
# ---
# name: test_binary_sensors[door-lock-True][binary_sensor.mock_door_lock_battery-state]
# name: test_binary_sensors[door_lock-True][binary_sensor.mock_door_lock_battery-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'battery',
Expand All @@ -46,7 +46,7 @@
'state': 'off',
})
# ---
# name: test_binary_sensors[door-lock-True][binary_sensor.mock_door_lock_door-entry]
# name: test_binary_sensors[door_lock-True][binary_sensor.mock_door_lock_door-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
Expand Down Expand Up @@ -79,7 +79,7 @@
'unit_of_measurement': None,
})
# ---
# name: test_binary_sensors[door-lock-True][binary_sensor.mock_door_lock_door-state]
# name: test_binary_sensors[door_lock-True][binary_sensor.mock_door_lock_door-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'door',
Expand All @@ -93,7 +93,7 @@
'state': 'off',
})
# ---
# name: test_binary_sensors[smoke-detector-True][binary_sensor.smoke_sensor_battery_alert-entry]
# name: test_binary_sensors[smoke_detector-True][binary_sensor.smoke_sensor_battery_alert-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
Expand Down Expand Up @@ -126,7 +126,7 @@
'unit_of_measurement': None,
})
# ---
# name: test_binary_sensors[smoke-detector-True][binary_sensor.smoke_sensor_battery_alert-state]
# name: test_binary_sensors[smoke_detector-True][binary_sensor.smoke_sensor_battery_alert-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'battery',
Expand All @@ -140,7 +140,7 @@
'state': 'off',
})
# ---
# name: test_binary_sensors[smoke-detector-True][binary_sensor.smoke_sensor_end_of_service-entry]
# name: test_binary_sensors[smoke_detector-True][binary_sensor.smoke_sensor_end_of_service-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
Expand Down Expand Up @@ -173,7 +173,7 @@
'unit_of_measurement': None,
})
# ---
# name: test_binary_sensors[smoke-detector-True][binary_sensor.smoke_sensor_end_of_service-state]
# name: test_binary_sensors[smoke_detector-True][binary_sensor.smoke_sensor_end_of_service-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'problem',
Expand All @@ -187,7 +187,7 @@
'state': 'off',
})
# ---
# name: test_binary_sensors[smoke-detector-True][binary_sensor.smoke_sensor_hardware_fault-entry]
# name: test_binary_sensors[smoke_detector-True][binary_sensor.smoke_sensor_hardware_fault-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
Expand Down Expand Up @@ -220,7 +220,7 @@
'unit_of_measurement': None,
})
# ---
# name: test_binary_sensors[smoke-detector-True][binary_sensor.smoke_sensor_hardware_fault-state]
# name: test_binary_sensors[smoke_detector-True][binary_sensor.smoke_sensor_hardware_fault-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'problem',
Expand All @@ -234,7 +234,7 @@
'state': 'off',
})
# ---
# name: test_binary_sensors[smoke-detector-True][binary_sensor.smoke_sensor_muted-entry]
# name: test_binary_sensors[smoke_detector-True][binary_sensor.smoke_sensor_muted-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
Expand Down Expand Up @@ -267,7 +267,7 @@
'unit_of_measurement': None,
})
# ---
# name: test_binary_sensors[smoke-detector-True][binary_sensor.smoke_sensor_muted-state]
# name: test_binary_sensors[smoke_detector-True][binary_sensor.smoke_sensor_muted-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'friendly_name': 'Smoke sensor Muted',
Expand All @@ -280,7 +280,7 @@
'state': 'off',
})
# ---
# name: test_binary_sensors[smoke-detector-True][binary_sensor.smoke_sensor_smoke-entry]
# name: test_binary_sensors[smoke_detector-True][binary_sensor.smoke_sensor_smoke-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
Expand Down Expand Up @@ -313,7 +313,7 @@
'unit_of_measurement': None,
})
# ---
# name: test_binary_sensors[smoke-detector-True][binary_sensor.smoke_sensor_smoke-state]
# name: test_binary_sensors[smoke_detector-True][binary_sensor.smoke_sensor_smoke-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'smoke',
Expand All @@ -327,7 +327,7 @@
'state': 'off',
})
# ---
# name: test_binary_sensors[smoke-detector-True][binary_sensor.smoke_sensor_test_in_progress-entry]
# name: test_binary_sensors[smoke_detector-True][binary_sensor.smoke_sensor_test_in_progress-entry]
EntityRegistryEntrySnapshot({
'aliases': set({
}),
Expand Down Expand Up @@ -360,7 +360,7 @@
'unit_of_measurement': None,
})
# ---
# name: test_binary_sensors[smoke-detector-True][binary_sensor.smoke_sensor_test_in_progress-state]
# name: test_binary_sensors[smoke_detector-True][binary_sensor.smoke_sensor_test_in_progress-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'device_class': 'running',
Expand Down
Loading

0 comments on commit 662a704

Please sign in to comment.