summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwil paredes <code@dystedium.com>2014-06-05 18:11:26 -0700
committerwil paredes <code@dystedium.com>2014-06-05 18:11:26 -0700
commita48c2d84fa9606fe3b83ad95061672de54865e2e (patch)
tree534c5368280f62fd0c16b8f31468d7c34c5e9649
parenta3d8aad61a19ba05fa445a5de828513681324094 (diff)
downloadredis-py-a48c2d84fa9606fe3b83ad95061672de54865e2e.tar.gz
lock tests: change lock.token to lock.local.token
-rw-r--r--tests/test_lock.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_lock.py b/tests/test_lock.py
index 028f9a6..d732ae1 100644
--- a/tests/test_lock.py
+++ b/tests/test_lock.py
@@ -16,7 +16,7 @@ class TestLock(object):
def test_lock(self, sr):
lock = self.get_lock(sr, 'foo')
assert lock.acquire(blocking=False)
- assert sr.get('foo') == lock.token
+ assert sr.get('foo') == lock.local.token
assert sr.ttl('foo') == -1
lock.release()
assert sr.get('foo') is None
@@ -56,7 +56,7 @@ class TestLock(object):
# blocking_timeout prevents a deadlock if the lock can't be acquired
# for some reason
with self.get_lock(sr, 'foo', blocking_timeout=0.2) as lock:
- assert sr.get('foo') == lock.token
+ assert sr.get('foo') == lock.local.token
assert sr.get('foo') is None
def test_high_sleep_raises_error(self, sr):
@@ -77,7 +77,7 @@ class TestLock(object):
with pytest.raises(LockError):
lock.release()
# even though we errored, the token is still cleared
- assert lock.token is None
+ assert lock.local.token is None
def test_extend_lock(self, sr):
lock = self.get_lock(sr, 'foo', timeout=10)