Skip to content
Snippets Groups Projects
Commit 93246b45 authored by Taya Snijder's avatar Taya Snijder
Browse files

changed

parent eec59660
No related branches found
No related tags found
1 merge request!359Resolve L2SS-679 "Initial pdu support"
...@@ -170,18 +170,10 @@ class TestSNMP(base.TestCase): ...@@ -170,18 +170,10 @@ class TestSNMP(base.TestCase):
hlapi.ObjectType = obj_type 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]) 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 = [] 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 # 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. # call the write function. This function should now call m_ObjectType itself.
snmp_attr.write_function(set_val) snmp_attr.write_function(set_val)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment