mirror of
https://github.com/drewkerrigan/nagios-http-json.git
synced 2024-12-22 09:03:57 +01:00
Extend tests for array syntax
This commit is contained in:
parent
dddf8432d6
commit
27c710b2ea
@ -110,6 +110,14 @@ class UtilTest(unittest.TestCase):
|
||||
self.check_data(RulesHelper().dash_U(['metric,0']),
|
||||
'{"metric": 3}', UNKNOWN_CODE)
|
||||
|
||||
def test_array(self):
|
||||
self.check_data(RulesHelper().dash_q(['foo(0),bar']),
|
||||
'{"foo": ["bar"]}', OK_CODE)
|
||||
self.check_data(RulesHelper().dash_q(['foo(0),foo']),
|
||||
'{"foo": ["bar"]}', WARNING_CODE)
|
||||
self.check_data(RulesHelper().dash_Q(['foo(1),bar']),
|
||||
'{"foo": ["bar"]}', CRITICAL_CODE)
|
||||
|
||||
def test_exists(self):
|
||||
self.check_data(RulesHelper().dash_e(['nothere']),
|
||||
'{"metric": 5}', WARNING_CODE)
|
||||
|
Loading…
Reference in New Issue
Block a user