From 6b39d87f3d14936f0f07083cb8df4f565451d5dc Mon Sep 17 00:00:00 2001
From: stedif <stefano.difrischia@inaf.it>
Date: Thu, 8 Sep 2022 11:53:37 +0200
Subject: [PATCH] L2SS-921: unittest added

---
 .../test/devices/test_antennafield_device.py              | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/tangostationcontrol/tangostationcontrol/test/devices/test_antennafield_device.py b/tangostationcontrol/tangostationcontrol/test/devices/test_antennafield_device.py
index 96eb83300..7c080631e 100644
--- a/tangostationcontrol/tangostationcontrol/test/devices/test_antennafield_device.py
+++ b/tangostationcontrol/tangostationcontrol/test/devices/test_antennafield_device.py
@@ -389,3 +389,11 @@ class TestAntennafieldDevice(device_base.DeviceTestCase):
         antenna_properties = {'Antenna_Quality': antenna_qualities, 'Antenna_Use': antenna_use}
         with DeviceTestContext(antennafield.AntennaField, properties={**self.AT_PROPERTIES, **antenna_properties}, process=True) as proxy:
             numpy.testing.assert_equal(numpy.array([True] + [False] * 95), proxy.Antenna_Usage_Mask_R)
+    
+    def test_read_Antenna_Names(self):
+       """ Verify if Antenna_Names_R is correctly retrieved """
+       antenna_names = ["C0","C1","C2","C3","C4"]
+       antenna_properties = {'Antenna_Names' : antenna_names}
+       with DeviceTestContext(antennafield.AntennaField, properties={**self.AT_PROPERTIES, **antenna_properties}, process=True) as proxy:
+            for i in range(len(antenna_names)):
+                self.assertTrue(proxy.Antenna_Names_R[i]==f"C{i}")
-- 
GitLab