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})
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 })
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)
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)
def test_status_poll_empty(self): """ snmp_status with no params returns false """ eq_(poll_snmp_status(self.poller_buffer, '', **self.test_kwargs), False)
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)
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)