Beispiel #1
0
 def test_clone_non_default(self):
     ch = CheckNTPMon(1, 2, 9, 49, 80, 60)
     self.assertFalse(ch.is_silent())
     c = CheckNTPMonSilent.clone(ch)
     self.assertTrue(c.is_silent())
     self.assertEqual(c.warnpeers, 1)
     self.assertEqual(c.okpeers, 2)
     self.assertEqual(c.warnoffset, 9)
     self.assertEqual(c.critoffset, 49)
     self.assertEqual(c.warnreach, 80)
     self.assertEqual(c.critreach, 60)
Beispiel #2
0
 def test_clone(self):
     ch = CheckNTPMon()
     self.assertFalse(ch.is_silent())
     c = CheckNTPMonSilent.clone(ch)
     self.assertTrue(c.is_silent())
     self.assertEqual(c.warnpeers, 2)
     self.assertEqual(c.okpeers, 4)
     self.assertEqual(c.warnoffset, 10)
     self.assertEqual(c.critoffset, 50)
     self.assertEqual(c.warnreach, 75)
     self.assertEqual(c.critreach, 50)