test: config updates should update the device

This commit is contained in:
wakonig_k authored and Klaus Wakonig committed 2026-09-25 09:47:52 +02:00
1 parent abd7c441f7
commit d6ef21db90
1 file changed
+9
+9
View File
@@ -1,5 +1,7 @@
from unittest import mock
from bec_lib import messages
from ophyd_devices.utils.controller import Controller
@@ -48,7 +50,14 @@ def test_controller_with_multiple_axes(dm_with_devices):
controller = Controller(
socket_cls=socket_cls, socket_host="dummy", socket_port=123, device_manager=dm_with_devices
)
def apply_config_update(action, config):
dm_with_devices.parse_config_message(
messages.DeviceConfigMessage(action=action, config=config)
)
with mock.patch.object(controller.device_manager, "config_helper") as mock_config_helper:
mock_config_helper.send_config_request.side_effect = apply_config_update
# Disable samx, samy first
dm_with_devices.devices.get("samx").enabled = False
dm_with_devices.devices.get("samy").enabled = False