fakeredis
fakeredis copied to clipboard
json().mget gives incompatible results from real redis
As an example:
import redis
import fakeredis
r = fakeredis.FakeStrictRedis()
r.json().set('a', '$', {'hello': 'world'})
print('fakeredis:')
print(r.json().mget(['a'], '$'))
r = redis.StrictRedis()
r.json().set('a', '$', {'hello': 'world'})
print('redis:')
print(r.json().mget(['a'], '$'))
This will print:
fakeredis:
[{'hello': 'world'}]
redis:
[[{'hello': 'world'}]]