Skip to content

Inconsistent HSET behaviour with booleans in Lua #269

@upcFrost

Description

@upcFrost

Hi,

Found an inconsistent behaviour of fakeredis when using HSET and booleans. See the script below

import fakeredis
redis = fakeredis.FakeStrictRedis()
call = redis.register_script('redis.call("HSET", "mykey", "luavalue", true)')
call()
redis.hget("mykey", "luavalue")
# b'1'

Real redis:

127.0.0.1:6379> eval 'redis.call("HSET", "mykey", "test_value", true)' 0
(error) ERR Error running script (call to f_100352cfb27b6960ee5471ec9b8f92fed22e57df): @user_script:1: @user_script: 1: Lua redis() command arguments must be strings or integers

With redis-py fails as well

Redis 6.0.3
Fakeredis 1.4.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions