Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

decode_responses=True doesn't work #97

Open
pbecotte opened this issue Jan 31, 2016 · 2 comments
Open

decode_responses=True doesn't work #97

pbecotte opened this issue Jan 31, 2016 · 2 comments

Comments

@pbecotte
Copy link

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'
romanlevin pushed a commit to romanlevin/mockredis that referenced this issue Feb 13, 2017
linuxmaniac pushed a commit to linuxmaniac/mockredis that referenced this issue Sep 8, 2017
PCManticore pushed a commit to zapier/mockredis that referenced this issue May 17, 2018
@JethroMV
Copy link

JethroMV commented Jul 8, 2019

Any update on getting this fixed?

@richfromm
Copy link
Member

The project README was updated 2 months ago to indicate that this repo is no longer supported:
1a8d82f

If someone wants to take over managing this repo, feel free to fork it, and we can also update the README again to point to your fork.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants