Exemplo n.º 1
0
 def test_parse_size_span_min_value(self):
     hs = CheckHttpSize()
     with Capturing() as output:
         r = hs.parse_size_span('10:','hep')
     self.assertEqual(r, (10, 99999999))
     self.assertEqual(output.stdout(), [], 'there should be no stdout')
     self.assertEqual(output.stderr(), [], 'there should be no stderr')
Exemplo n.º 2
0
 def test_parse_size_span_param_int(self):
     hs = CheckHttpSize()
     try:
         with Capturing() as output:
             hs.parse_size_span(None,'hep')
     except SystemExit as e:
         error = e.args[0]
     self.assertEqual(error, NAG_CRITICAL)
     self.assertEqual(output.stderr(), [], 'there should be no stderr')