215
215
self.assertRaises(errors.TokenMismatch,
216
216
self.lockable.lock_write, token=different_token)
219
219
# This detects the case where a caller claims to have a lock (via
220
220
# the token) for an external resource, but doesn't (the token is
222
222
# external resource is probed, whereas the existing lock object
224
224
new_lockable = self.get_lockable()