Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(6)  |  Call(6)  |  Derive(0)  |  Import(0)

        def mock_mode():
    global time
    global sleep
    global is_real
    assert is_real
    mock_time = _MockTime()
    time = mock_time.time
    sleep = mock_time.sleep
    is_real = False
        


src/p/y/pymdht-HEAD/core/test_tracker.py   pymdht(Download)
    def setUp(self):
        time.mock_mode()
        self.t = tracker.Tracker(VALIDITY_PERIOD, CLEANUP_COUNTER)
 
    def test_put(self):

src/p/y/pymdht-HEAD/core/test_querier.py   pymdht(Download)
    def setUp(self):
        time.mock_mode()
        self.querier = Querier()#tc.CLIENT_ID)
 
    def test_generate_tids(self):

src/p/y/pymdht-HEAD/core/test_minitwisted.py   pymdht(Download)
    def setUp(self):
        time.mock_mode()
        self.main_loop_call_counter = 0
        self.callback_values = []
        self.datagrams_received = []

src/p/y/pymdht-HEAD/core/test_floodbarrier.py   pymdht(Download)
    def setUp(self):
        time.mock_mode()
 
    def test(self):
        fb = FloodBarrier(checking_period=.4,

src/p/y/pymdht-HEAD/core/test_controller.py   pymdht(Download)
    def setUp(self):
        time.mock_mode()
 
        self.controller = controller.Controller(VERSION_LABEL,
                                                tc.CLIENT_NODE,

src/p/y/pymdht-HEAD/core/test_boostrap.py   pymdht(Download)
    def setUp(self):
        time.mock_mode()
 
    def test_general(self):
        b = bootstrap.OverlayBootstrapper(CONF_PATH, False)