示例#1
0
    def test_supports_Timer_interface(self):
        x = Timer()
        x.stop()

        tref = Mock()
        x.cancel(tref)
        tref.cancel.assert_called_with()

        assert x.schedule is x
示例#2
0
文件: test_timer.py 项目: Scalr/kombu
    def test_supports_Timer_interface(self):
        x = Timer()
        x.stop()

        tref = Mock()
        x.cancel(tref)
        tref.cancel.assert_called_with()

        assert x.schedule is x
示例#3
0
 def test_cancel(self):
     t = Timer()
     tref = Mock()
     t.cancel(tref)
     tref.cancel.assert_called_with()
示例#4
0
文件: test_timer.py 项目: Scalr/kombu
 def test_cancel(self):
     t = Timer()
     tref = Mock()
     t.cancel(tref)
     tref.cancel.assert_called_with()