From 93246b45b889c826a8c5ed137eb92e674a61e6e3 Mon Sep 17 00:00:00 2001 From: thijs snijder <snijder@astron.nl> Date: Thu, 7 Jul 2022 10:24:13 +0200 Subject: [PATCH] changed --- .../test/clients/test_snmp_client.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/tangostationcontrol/tangostationcontrol/test/clients/test_snmp_client.py b/tangostationcontrol/tangostationcontrol/test/clients/test_snmp_client.py index 6cacf4630..bb78a9f63 100644 --- a/tangostationcontrol/tangostationcontrol/test/clients/test_snmp_client.py +++ b/tangostationcontrol/tangostationcontrol/test/clients/test_snmp_client.py @@ -170,18 +170,10 @@ class TestSNMP(base.TestCase): hlapi.ObjectType = obj_type snmp_attr = snmp_attribute(comm=m_comms, mib="test", name="test", idx=0, dtype=server.SNMP_TO_NUMPY_DICT[i], dim_x=server.DIM_LIST[j][0], dim_y=server.DIM_LIST[j][1]) - res_lst = [] - def m_ObjectType(*value): - """ - This function mocks the ObjectType class and taps off the value its given. - """ - res_lst.append(value[1]) - return None, None, None, server.get_return_val(i, server.DIM_LIST[j]) - # set hlapi.ObjectType to the mocked m_ObjectType function - hlapi.ObjectType = m_ObjectType + hlapi.ObjectType = loop_test # call the write function. This function should now call m_ObjectType itself. snmp_attr.write_function(set_val) -- GitLab