From 448ac6a6e8ac93b6bc636c2b3de1abebd4da232c Mon Sep 17 00:00:00 2001 From: stedif <stefano.difrischia@inaf.it> Date: Tue, 10 Jan 2023 18:59:26 +0100 Subject: [PATCH] L2SS-1137: restore integration-test env --- .../devices/test_lofar_device_proxy.py | 30 ------------------- .../integration_test/device_proxy.py | 5 ++-- 2 files changed, 2 insertions(+), 33 deletions(-) delete mode 100644 tangostationcontrol/tangostationcontrol/integration_test/default/devices/test_lofar_device_proxy.py diff --git a/tangostationcontrol/tangostationcontrol/integration_test/default/devices/test_lofar_device_proxy.py b/tangostationcontrol/tangostationcontrol/integration_test/default/devices/test_lofar_device_proxy.py deleted file mode 100644 index dcb9a8b1a..000000000 --- a/tangostationcontrol/tangostationcontrol/integration_test/default/devices/test_lofar_device_proxy.py +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright (C) 2022 ASTRON (Netherlands Institute for Radio Astronomy) -# SPDX-License-Identifier: Apache-2.0 - -from tango import DevState - -from tangostationcontrol.integration_test.device_proxy import TestDeviceProxy -from .base import AbstractTestBases - - -class TestLOFARDeviceProxy(AbstractTestBases.TestDeviceBase): - def setup_recv_proxy(self): - """setup RECV""" - recv_proxy = TestDeviceProxy("STAT/RECV/1") - recv_proxy.off() - recv_proxy.warm_boot() - recv_proxy.set_defaults() - return recv_proxy - - def test_lofar_device_proxy_creation(self): - """Test whether a device proxy is correctly created even if not defined in TangoDB""" - # STAT/RECV/1 defined in TangoDB - recv1_proxy = TestDeviceProxy("STAT/RECV/1") - self.assertEqual("RECV(stat/recv/1)", str(recv1_proxy)) - self.assertTrue(recv1_proxy.connected) - recv1_proxy.off() - self.assertEqual(DevState.OFF, recv1_proxy.state()) - # STAT/RECV/99 not defined in TangoDB - recv2_proxy = TestDeviceProxy("STAT/RECV/99") - self.assertEqual("LOFARDeviceProxy(STAT/RECV/99)", str(recv2_proxy)) - self.assertFalse(recv2_proxy.connected) diff --git a/tangostationcontrol/tangostationcontrol/integration_test/device_proxy.py b/tangostationcontrol/tangostationcontrol/integration_test/device_proxy.py index 79fe544c3..d61e4f00a 100644 --- a/tangostationcontrol/tangostationcontrol/integration_test/device_proxy.py +++ b/tangostationcontrol/tangostationcontrol/integration_test/device_proxy.py @@ -4,13 +4,12 @@ import logging import time -from tango import DevSource -from tangostationcontrol.devices.lofar_device_proxy import LOFARDeviceProxy +from tango import DeviceProxy, DevSource logger = logging.getLogger() -class TestDeviceProxy(LOFARDeviceProxy): +class TestDeviceProxy(DeviceProxy): def __init__(self, *args, **kwargs): super(TestDeviceProxy, self).__init__(*args, **kwargs) -- GitLab