From b12f46f102654a1d47674e65d36e08206bcc4973 Mon Sep 17 00:00:00 2001 From: matt Date: Mon, 23 Oct 2023 18:51:27 +0100 Subject: [PATCH] make callback a callable for test to pass --- .../lcls_tools/common/devices/test_device.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/unit_tests/lcls_tools/common/devices/test_device.py b/tests/unit_tests/lcls_tools/common/devices/test_device.py index c0716e66..e0bbff0f 100644 --- a/tests/unit_tests/lcls_tools/common/devices/test_device.py +++ b/tests/unit_tests/lcls_tools/common/devices/test_device.py @@ -126,9 +126,15 @@ def mock_callback(message: str) -> None: print(f"callback: {message}") # Add different callbacks to Device - first_callback = mock_callback("first") - second_callback = mock_callback("second") - third_callback = mock_callback("third") + def first_callback(): + mock_callback("first") + + def second_callback(): + mock_callback("second") + + def third_callback(): + mock_callback("third") + self.device.add_callback_to_pv( "bact", first_callback,