Пример #1
0
 def test_status_poll_no_default(self):
     """ poll_snmp_status with mapping return true """
     eq_(poll_snmp_status(self.poller_buffer, '1.2.3|1=2',
                          **self.test_kwargs), True)
     self.assert_get_str_called(
         (1, 2, 3), cb_snmp_status,
         {'mapping': '1=2', 'default_state': None})
Пример #2
0
 def test_status_poll_no_default(self):
     """ poll_snmp_status with mapping return true """
     eq_(
         poll_snmp_status(self.poller_buffer, '1.2.3|1=2',
                          **self.test_kwargs), True)
     self.assert_get_str_called((1, 2, 3), cb_snmp_status, {
         'mapping': '1=2',
         'default_state': None
     })
Пример #3
0
 def test_status_poll_badoid(self):
     """ snmp_status with bad oid returns false """
     eq_(
         poll_snmp_status(self.poller_buffer, 'badoid|1=2',
                          **self.test_kwargs), False)
Пример #4
0
 def test_status_poll_badparam(self):
     """ snmp_status with bad params returns false """
     eq_(poll_snmp_status(self.poller_buffer, 'fooo', **self.test_kwargs),
         False)
Пример #5
0
 def test_status_poll_empty(self):
     """ snmp_status with no params returns false """
     eq_(poll_snmp_status(self.poller_buffer, '', **self.test_kwargs),
         False)
Пример #6
0
 def test_status_poll_no_mapping(self):
     """ poll_snmp_status with no mapping return False """
     eq_(poll_snmp_status(self.poller_buffer, '1.2.3', **self.test_kwargs),
         False)
Пример #7
0
 def test_status_poll_no_mapping(self):
     """ poll_snmp_status with no mapping return False """
     eq_(poll_snmp_status(self.poller_buffer, '1.2.3', **self.test_kwargs),
         False)
Пример #8
0
 def test_status_poll_badoid(self):
     """ snmp_status with bad oid returns false """
     eq_(poll_snmp_status(self.poller_buffer, 'badoid|1=2',
                          **self.test_kwargs), False)
Пример #9
0
 def test_status_poll_badparam(self):
     """ snmp_status with bad params returns false """
     eq_(poll_snmp_status(self.poller_buffer, 'fooo',
                          **self.test_kwargs), False)
Пример #10
0
 def test_status_poll_empty(self):
     """ snmp_status with no params returns false """
     eq_(poll_snmp_status(self.poller_buffer, '',
                          **self.test_kwargs), False)