'BlockingConnection.sleep'

def test(self):

    connection = self._connect()
    start_time = time.time()
    connection.sleep(duration=0)
    elapsed = (time.time() - start_time)
    self.assertLess(elapsed, 0.25)
    start_time = time.time()
    connection.sleep(duration=0.005)
    elapsed = (time.time() - start_time)
    self.assertGreaterEqual(elapsed, 0.005)
    self.assertLess(elapsed, 0.25)
