def test_stop(self): pred = ZookeeperGoodUntilTime("test", {}, None, "/path", None, interval=self.interval) self.mox.StubOutWithMock(pred, "_watch_node") pred._watch_node() self.mox.ReplayAll() pred.start() pred.stop() pred.stop() pred.stop() self.mox.VerifyAll()
def test_start(self): pred = ZookeeperGoodUntilTime("test", {}, None, "/path", None, interval=self.interval) self.mox.StubOutWithMock(pred, "_watch_node") pred._watch_node() self.mox.ReplayAll() print "This test should complete quickly" pred.start() pred.start() # should noop pred.start() # should noop pred.stop() self.mox.VerifyAll()