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

Added test pymib file and tests

parent 591412b5
No related branches found
No related tags found
1 merge request!288Resolve L2SS-446 "Extend snmp client to support mib files"
......@@ -256,3 +256,4 @@ class mib_loader:
self.mibBuilder.loadModule(mib_name)
......@@ -4,3 +4,4 @@ NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues")
testNamedValue = MibScalar((9, 8, 7, 6, 5, 4, 3, 2, 1), Integer32().subtype(subtypeSpec=ConstraintsUnion(SingleValueConstraint(1, 2, 3, 4, 5, 6, 7))).clone(namedValues=NamedValues(("A", 1), ("B", 2), ("C", 3), ("D", 4)))).setMaxAccess("readonly")
mibBuilder.exportSymbols("TEST-MIB", testNamedValue=testNamedValue)
......@@ -66,9 +66,3 @@ class TestMibLoading(base.TestCase):
# get the numerical value
self.assertEqual(int(obj_T[1]), testNamedValue_value)
......@@ -196,6 +196,3 @@ class TestSNMP(base.TestCase):
# check to make sure the value is indeed 2
self.assertEqual(ret_val, 2, f"Expected: to get {2}, got: {ret_val} of type {type(ret_val)}")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment