fakeredis icon indicating copy to clipboard operation
fakeredis copied to clipboard

json().mget gives incompatible results from real redis

Open zh217 opened this issue 6 months ago • 0 comments

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'}]]

zh217 avatar Aug 05 '24 10:08 zh217