def test_check_tcp(self): params = self.params_tcp check = ServiceCheck.tcp(self.dummyservice, params) self.assertEqual(check['tcp'], '6.6.6.6:666') self.assertEqual(check['interval'], '17s') self.assertEqual(check['timeout'], '3s') self.assertEqual(check['DeregisterCriticalServiceAfter'], '666s') self.assertEqual(len(check), 4)
def test_check_tcp_false(self): params = self.params_tcp params['tcp'] = 'false' check = ServiceCheck.tcp(self.dummyservice, params) self.assertIsNone(check)