summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy McCurdy <andy@andymccurdy.com>2014-04-10 08:42:59 -0700
committerAndy McCurdy <andy@andymccurdy.com>2014-04-10 08:42:59 -0700
commit05508e61f3c5d59bc8ae9b17ae778d52a93c3c9e (patch)
tree74198f5385f1ed835bbeaa363dd9ac931ae404af
parent38135072b09eaad3e1569756b5deaf5ba4b5631c (diff)
downloadredis-py-05508e61f3c5d59bc8ae9b17ae778d52a93c3c9e.tar.gz
fix scripting tests on python3
-rw-r--r--tests/test_scripting.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/test_scripting.py b/tests/test_scripting.py
index 48f6138..4849c81 100644
--- a/tests/test_scripting.py
+++ b/tests/test_scripting.py
@@ -2,6 +2,7 @@ from __future__ import with_statement
import pytest
from redis import exceptions
+from redis._compat import b
multiply_script = """
@@ -65,7 +66,7 @@ class TestScripting(object):
assert multiply.sha
assert r.script_exists(multiply.sha) == [True]
# [SET worked, GET 'a', result of multiple script]
- assert pipe.execute() == [True, '2', 6]
+ assert pipe.execute() == [True, b('2'), 6]
# purge the script from redis's cache and re-run the pipeline
# the multiply script object knows it's sha, so it shouldn't get
@@ -78,4 +79,4 @@ class TestScripting(object):
multiply(keys=['a'], args=[3], client=pipe)
assert r.script_exists(multiply.sha) == [False]
# [SET worked, GET 'a', result of multiple script]
- assert pipe.execute() == [True, '2', 6]
+ assert pipe.execute() == [True, b('2'), 6]