Skip to content

Commit 05508e6

Browse files
committed
fix scripting tests on python3
1 parent 3813507 commit 05508e6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/test_scripting.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import pytest
33

44
from redis import exceptions
5+
from redis._compat import b
56

67

78
multiply_script = """
@@ -65,7 +66,7 @@ def test_script_object_in_pipeline(self, r):
6566
assert multiply.sha
6667
assert r.script_exists(multiply.sha) == [True]
6768
# [SET worked, GET 'a', result of multiple script]
68-
assert pipe.execute() == [True, '2', 6]
69+
assert pipe.execute() == [True, b('2'), 6]
6970

7071
# purge the script from redis's cache and re-run the pipeline
7172
# the multiply script object knows it's sha, so it shouldn't get
@@ -78,4 +79,4 @@ def test_script_object_in_pipeline(self, r):
7879
multiply(keys=['a'], args=[3], client=pipe)
7980
assert r.script_exists(multiply.sha) == [False]
8081
# [SET worked, GET 'a', result of multiple script]
81-
assert pipe.execute() == [True, '2', 6]
82+
assert pipe.execute() == [True, b('2'), 6]

0 commit comments

Comments
 (0)