Exemplo n.º 1
0
 def testCancelTimerShouldInvokeCancelMethodTimer(self):
     process = Mock()
     timer = Mock()
     process_timeout = ProcessTimeout(process, 1000)
     process_timeout.timer = timer
     
     process_timeout.cancel_timer()
     
     timer.cancel.assert_called()
Exemplo n.º 2
0
 def testStartTimerShouldInvokeStartMethodTimer(self):
     process = Mock()
     timer = Mock()
     process_timeout = ProcessTimeout(process, 1000)
     process_timeout.timer = timer
     
     process_timeout.start_timer()
     
     timer.start.assert_called()