diff --git a/tests/components/reolink/test_services.py b/tests/components/reolink/test_services.py index 6ae9a2d9729..38819bbd51d 100644 --- a/tests/components/reolink/test_services.py +++ b/tests/components/reolink/test_services.py @@ -20,8 +20,8 @@ from tests.common import MockConfigEntry async def test_play_chime_service_entity( hass: HomeAssistant, config_entry: MockConfigEntry, - reolink_connect: MagicMock, - test_chime: Chime, + reolink_host: MagicMock, + reolink_chime: Chime, entity_registry: er.EntityRegistry, ) -> None: """Test chime play service.""" @@ -37,14 +37,14 @@ async def test_play_chime_service_entity( device_id = entity.device_id # Test chime play service with device - test_chime.play = AsyncMock() + reolink_chime.play = AsyncMock() await hass.services.async_call( DOMAIN, "play_chime", {ATTR_DEVICE_ID: [device_id], ATTR_RINGTONE: "attraction"}, blocking=True, ) - test_chime.play.assert_called_once() + reolink_chime.play.assert_called_once() # Test errors with pytest.raises(ServiceValidationError): @@ -55,7 +55,7 @@ async def test_play_chime_service_entity( blocking=True, ) - test_chime.play = AsyncMock(side_effect=ReolinkError("Test error")) + reolink_chime.play = AsyncMock(side_effect=ReolinkError("Test error")) with pytest.raises(HomeAssistantError): await hass.services.async_call( DOMAIN, @@ -64,7 +64,7 @@ async def test_play_chime_service_entity( blocking=True, ) - test_chime.play = AsyncMock(side_effect=InvalidParameterError("Test error")) + reolink_chime.play = AsyncMock(side_effect=InvalidParameterError("Test error")) with pytest.raises(ServiceValidationError): await hass.services.async_call( DOMAIN, @@ -73,7 +73,7 @@ async def test_play_chime_service_entity( blocking=True, ) - reolink_connect.chime.return_value = None + reolink_host.chime.return_value = None with pytest.raises(ServiceValidationError): await hass.services.async_call( DOMAIN, @@ -86,8 +86,8 @@ async def test_play_chime_service_entity( async def test_play_chime_service_unloaded( hass: HomeAssistant, config_entry: MockConfigEntry, - reolink_connect: MagicMock, - test_chime: Chime, + reolink_host: MagicMock, + reolink_chime: Chime, entity_registry: er.EntityRegistry, ) -> None: """Test chime play service when config entry is unloaded."""