def test_release(self):
        self.mock_lock.acquired = True
        lock = locking.ToozLock(self.mock_lock)

        lock.release()

        self.mock_lock.release.assert_called_once_with()
    def test_context(self):
        lock = locking.ToozLock(self.mock_lock)

        with lock:
            self.mock_lock.acquire.assert_called_once_with()

        self.mock_lock.release.assert_called_once_with()
 def test_acquire(self):
     lock = locking.ToozLock(self.mock_lock)
     lock.acquire()
     self.mock_lock.acquire.assert_called_once_with(blocking=True)