'Test invoking acquire() with a positive timeout when the lock is
already acquired. Ensure that time.sleep() is invoked with the given
timeout and that False is returned.'

@mock.patch('time.sleep')
def test_acquire_timeout(self, mock_sleep):

    self.lock.acquire()
    retval = self.lock.acquire(waitflag=0, timeout=1)
    self.assertTrue(mock_sleep.called)
    mock_sleep.assert_called_once_with(1)
    self.assertEqual(retval, False)
