From 22252290249a3882ba6975e15fa357300c013904 Mon Sep 17 00:00:00 2001 From: Jan David Mol <mol@astron.nl> Date: Wed, 26 Jan 2022 10:18:19 +0100 Subject: [PATCH] L2SS-480: Do patch DeviceProxy in lofar_base_device as well --- .../test/devices/test_beam_device.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tangostationcontrol/tangostationcontrol/test/devices/test_beam_device.py b/tangostationcontrol/tangostationcontrol/test/devices/test_beam_device.py index 07ac6ebdf..31e2d1c36 100644 --- a/tangostationcontrol/tangostationcontrol/test/devices/test_beam_device.py +++ b/tangostationcontrol/tangostationcontrol/test/devices/test_beam_device.py @@ -9,8 +9,9 @@ from tango import DevState from tango.test_context import DeviceTestContext +import tango -from tangostationcontrol.devices import beam +from tangostationcontrol.devices import beam, lofar_device import numpy import mock @@ -25,10 +26,11 @@ class TestBeamDevice(base.TestCase): # Patch DeviceProxy to allow making the proxies during initialisation # that we otherwise avoid using - proxy_patcher = mock.patch.object( - beam, 'DeviceProxy') - self.m_init = proxy_patcher.start() - self.addCleanup(proxy_patcher.stop) + for device in [beam, lofar_device]: + proxy_patcher = mock.patch.object( + device, 'DeviceProxy') + proxy_patcher.start() + self.addCleanup(proxy_patcher.stop) def test_get_pointing_directions(self): """Verify can read pointings attribute and length matches without err""" -- GitLab