def test_status_mapping(self): """ cb_snmp_status with match returns result """ cb_snmp_status('2', None, mapping='1=up,2=do', default_state=None, **self.test_kwargs) self.assert_callback('do')
def test_status_bad_mapping(self): """ cb_snmp_status with bad mapping returns None """ cb_snmp_status('100', None, mapping='foo', default_state=None, **self.test_kwargs) self.assert_callback_default()
def test_status_miss_mapping(self): """ cb_snmp_status with no match on mapping returns None """ cb_snmp_status('100', None, mapping='1=up,2=do', default_state=None, **self.test_kwargs) self.assert_callback_default()
def test_status_bad_mapping_miss(self): """ cb_snmp_status with bad mapping on missed item returns correctly """ cb_snmp_status('100', None, mapping='foo,100=up', default_state=None, **self.test_kwargs) self.assert_callback('up')
def test_status_no_mapping(self): """ cb_snmp_status with no mapping gives None """ cb_snmp_status('100', None, default_state=None, **self.test_kwargs) self.assert_callback_default()
def test_status_none(self): """ cb_snmp_status with None returns default """ cb_snmp_status(None, None, default_state=None, **self.test_kwargs) self.assert_callback_default()