示例#1
0
文件: test_snmp.py 项目: nomed/rnms
 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')
示例#2
0
文件: test_snmp.py 项目: nomed/rnms
 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()
示例#3
0
文件: test_snmp.py 项目: nomed/rnms
 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()
示例#4
0
文件: test_snmp.py 项目: nomed/rnms
 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')
示例#5
0
文件: test_snmp.py 项目: nomed/rnms
 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()
示例#6
0
文件: test_snmp.py 项目: csmall/rnms
 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')
示例#7
0
文件: test_snmp.py 项目: nomed/rnms
 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()
示例#8
0
文件: test_snmp.py 项目: csmall/rnms
 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()
示例#9
0
文件: test_snmp.py 项目: csmall/rnms
 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')
示例#10
0
文件: test_snmp.py 项目: csmall/rnms
 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()
示例#11
0
文件: test_snmp.py 项目: csmall/rnms
 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()
示例#12
0
文件: test_snmp.py 项目: csmall/rnms
 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()