Skip to content
Snippets Groups Projects

Resolve L2SS-404 "Archiving setup development"

Merged Resolve L2SS-404 "Archiving setup development"
All threads resolved!
Merged Stefano Di Frischia requested to merge L2SS-404-archiving-setup-development into master
All threads resolved!
Files
6
# -*- coding: utf-8 -*-
#
# This file is part of the LOFAR 2.0 Station Software
#
#
#
# Distributed under the terms of the APACHE license.
# See LICENSE.txt for more info.
from tangostationcontrol.integration_test.base import BaseIntegrationTestCase
from tangostationcontrol.integration_test.device_proxy import TestDeviceProxy
from tangostationcontrol.toolkit.archiver_util import get_attributes_from_suffix
from tango import DevState
import json
import pkg_resources
class TestArchiverUtil(BaseIntegrationTestCase):
def setUp(self):
super().setUp()
self.config_dict = json.load(pkg_resources.resource_stream('tangostationcontrol.toolkit', f'archiver_config/lofar2.json'))
def test_get_attributes_from_suffix(self):
"""Test if attributes are correctly matched with the defined global suffixes"""
device_name = 'STAT/RECV/1'
attribute_name = 'ANT_mask_RW'
suffixes = self.config_dict['_global_suffixes']
# Start RECV Device
recv_proxy = TestDeviceProxy(device_name)
recv_proxy.off()
self.assertEqual(DevState.OFF, recv_proxy.state())
self.assertIn(attribute_name, get_attributes_from_suffix(device_name,suffixes))
Loading