Exemplo n.º 1
0
 def testSleepValidate(self):
     s = installer.Sleep('30', None)
     self.assertRaises(installer.ValidationError, s.Validate)
     s = installer.Sleep([1, 2, 3], None)
     self.assertRaises(installer.ValidationError, s.Validate)
     s = installer.Sleep(['30'], None)
     self.assertRaises(installer.ValidationError, s.Validate)
     s = installer.Sleep([30], None)
     s.Validate()
Exemplo n.º 2
0
 def testSleep(self, sleep):
     s = installer.Sleep([30], None)
     s.Run()
     sleep.assert_called_with(30)
Exemplo n.º 3
0
 def testSleepString(self, sleep):
   s = installer.Sleep([1234, 'Some Reason.'], None)
   s.Run()
   sleep.assert_called_with(1234)