Exemple #1
0
 def setUp(self):
     super(TestSNMPInspector, self).setUp()
     self.inspector = snmp.SNMPInspector()
     self.host = netutils.urlsplit("snmp://localhost")
     self.useFixture(fixtures.MockPatchObject(
         snmp.cmdgen, 'CommandGenerator',
         return_value=FakeCommandGenerator()))
Exemple #2
0
 def setUp(self):
     super(TestSNMPInspector, self).setUp()
     self.inspector = snmp.SNMPInspector()
     self.host = netutils.urlsplit("snmp://localhost")
     self.inspector.MAPPING = self.mapping
     self.useFixture(mockpatch.PatchObject(
         self.inspector._cmdGen, 'getCmd', new=faux_getCmd_new))
     self.useFixture(mockpatch.PatchObject(
         self.inspector._cmdGen, 'bulkCmd', new=faux_bulkCmd_new))
Exemple #3
0
 def setUp(self):
     super(TestSNMPInspector, self).setUp()
     self.inspector = snmp.SNMPInspector()
     self.host = network_utils.urlsplit("snmp://localhost")
     self.useFixture(
         mockpatch.PatchObject(self.inspector._cmdGen,
                               'getCmd',
                               new=faux_getCmd))
     self.useFixture(
         mockpatch.PatchObject(self.inspector._cmdGen,
                               'nextCmd',
                               new=faux_nextCmd))