예제 #1
0
 def test_awaitSend_notsend_secondcount_overthr(self):
     timer = Timer(time_counter=TimeCounter(5))
     timer_proxy = self.mocker.proxy(timer)
     timer_proxy.over_threshold(mocker.ANY)
     self.mocker.result(True)
     self.mocker.replay()
     timer.awaitSend(False)
     self.assertFalse(timer.awaitSend.im_func(timer_proxy, False))
예제 #2
0
 def test_awaitSend_notsend_secondcount(self):
     timer = Timer(time_counter=TimeCounter(5))
     timer.awaitSend(False)
     self.assertTrue(timer.awaitSend(False))
예제 #3
0
 def test_awaitSend_notsend_firstcount(self):
     timer = Timer(time_counter=TimeCounter(5))
     self.assertFalse(timer.awaitSend(False))
예제 #4
0
 def test_awaitSend(self):
     timer = Timer(time_counter=TimeCounter(5))
     self.assertTrue(timer.awaitSend(True))