Exemple #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})
Exemple #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
     })
Exemple #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)
Exemple #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)
Exemple #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)
Exemple #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)
Exemple #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)
Exemple #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)
Exemple #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)
Exemple #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)