summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES2
-rw-r--r--tests/test_pipeline.py8
2 files changed, 9 insertions, 1 deletions
diff --git a/CHANGES b/CHANGES
index a10440c..6a42125 100644
--- a/CHANGES
+++ b/CHANGES
@@ -13,7 +13,7 @@
* Client instances and Connection pools now support a 'client_name'
argument. If supplied, all connections created will call CLIENT SETNAME
as soon as the connection is opened. Thanks to @Habbie for supplying
- the basis of this chanfge. #802
+ the basis of this change. #802
* Added the 'ssl_check_hostname' argument to specify whether SSL
connections should require the server hostname to match the hostname
specified in the SSL cert. By default 'ssl_check_hostname' is False
diff --git a/tests/test_pipeline.py b/tests/test_pipeline.py
index 08b7fba..867666b 100644
--- a/tests/test_pipeline.py
+++ b/tests/test_pipeline.py
@@ -242,6 +242,14 @@ class TestPipeline(object):
assert result == [True]
assert r['c'] == b'4'
+ def test_transaction_callable_returns_value_from_callable(self, r):
+ def callback(pipe):
+ # No need to do anything here since we only want the return value
+ return 'a'
+
+ res = r.transaction(callback, 'my-key', value_from_callable=True)
+ assert res == 'a'
+
def test_exec_error_in_no_transaction_pipeline(self, r):
r['a'] = 1
with r.pipeline(transaction=False) as pipe: