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

L2SS-874 added missing MIB test

parent d76ff879
No related branches found
No related tags found
1 merge request!427Resolve L2SS-874 "Mib loading test"
from pysnmp import hlapi from pysnmp import hlapi
from pysnmp.smi import view from pysnmp.smi import view, error
from pysnmp.smi.rfc1902 import ObjectIdentity from pysnmp.smi.rfc1902 import ObjectIdentity
from os import path from os import path
import numpy import numpy
...@@ -260,3 +260,11 @@ class TestMibLoading(base.TestCase): ...@@ -260,3 +260,11 @@ class TestMibLoading(base.TestCase):
# get the numerical value # get the numerical value
self.assertEqual(int(obj_T[1]), testNamedValue_value) self.assertEqual(int(obj_T[1]), testNamedValue_value)
def test_mib_missing(self):
abs_dir = path.dirname(__file__) + "/" + self.REL_DIR + "/"
loader = mib_loader(abs_dir)
with self.assertRaises(error.MibNotFoundError):
loader.load_pymib("FAKE-MIB")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment