diff --git a/tangostationcontrol/tangostationcontrol/test/clients/test_snmp_client.py b/tangostationcontrol/tangostationcontrol/test/clients/test_snmp_client.py
index 6cacf4630e7ba16b02c65954b6953042c22184dd..bb78a9f63dfbdc3efdf456cf05ab509a5c15d46f 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)