-
Notifications
You must be signed in to change notification settings - Fork 105
Open
Description
Setting decode_responses on the client should cause the client to return strings instead of bytes objects in python 3.
Python 3.5.0 (default, Oct 24 2015, 09:48:42)
[GCC 4.9.2] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from mockredis import mock_strict_redis_client
>>>
>>> redis = mock_strict_redis_client(decode_responses=True)
>>> redis.set('yo', 'hello')
True
>>> redis.get('yo')
b'hello'
Python 3.4.3 (default, Oct 14 2015, 20:28:29)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from redis import StrictRedis
>>> r = StrictRedis('redis')
>>> r.set('yo', 'hello')
True
>>> r.get('yo')
b'hello'
>>> r = StrictRedis('redis', decode_responses=True)
>>> r.get('yo')
'hello'
bobbyrenwick, dkleissa, Eswcvlad, whatupdave, romanlevin and 11 more
Metadata
Metadata
Assignees
Labels
No labels