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

L2SS-874 procesing reviews

parent a1ebd9a0
No related branches found
No related tags found
1 merge request!427Resolve L2SS-874 "Mib loading test"
from tangostationcontrol.test import base
from tangostationcontrol.clients.snmp_client import mib_loader
from pysnmp.smi import view from pysnmp.smi import view
import pysnmp.hlapi as pysnmp import pysnmp.hlapi as pysnmp
from pysnmp.smi.rfc1902 import ObjectIdentity from pysnmp.smi.rfc1902 import ObjectIdentity
from tangostationcontrol.test import base
from tangostationcontrol.clients.snmp_client import mib_loader
from os import path from os import path
...@@ -14,17 +16,17 @@ class TestMibLoading(base.TestCase): ...@@ -14,17 +16,17 @@ class TestMibLoading(base.TestCase):
MIB = "TEST-MIB" MIB = "TEST-MIB"
# mib file is in a folder that is in the same folder as this test # mib file is in a folder that is in the same folder as this test
REL_DIR = "SNMP_mib_loading/" REL_DIR = "snmp_mib_loading"
def test_content(self): def test_retrieve_mib_content(self):
""" """
This file contains a 1 variable named: testNamedValue with oid "9.8.7.6.5.4.3.2.1" with named values: ("A", 1), ("B", 2), ("C", 3), ("D", 4) This file contains a 1 variable named: testNamedValue with oid "1.3.99.1.99" with named values: ("test_name", 1), ("other_name", 2)
In order to confirm that the mib is indeed loaded correctly this test has to get the oids, the values and the named values In order to confirm that the mib is indeed loaded correctly this test has to get the oids, the values and the named values
""" """
abs_dir = path.dirname(__file__) + "/" + self.REL_DIR abs_dir = path.dirname(__file__) + "/" + self.REL_DIR + "/"
loader = mib_loader(abs_dir) loader = mib_loader(abs_dir)
loader.load_pymib(self.MIB) loader.load_pymib(self.MIB)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment