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

zadd with no member-score pairs should fail #180

Closed
jbaum-cmcrc opened this issue Mar 19, 2018 · 0 comments
Closed

zadd with no member-score pairs should fail #180

jbaum-cmcrc opened this issue Mar 19, 2018 · 0 comments

Comments

@jbaum-cmcrc
Copy link

When zadd is called with no member-score pairs, FakeStrictRedis returns 0 but StrictRedis raises an exception.

Expectation: FakeStrictRedis.zadd should raise an exception when called with zero member-score pairs, to match StrictRedis.

>>> from fakeredis import FakeStrictRedis
>>> from redis import StrictRedis
>>> 
>>> fake = FakeStrictRedis()
>>> real = StrictRedis(...)
>>> 
>>> fake.zadd('foo')
0
>>> real.zadd('foo')
Traceback (most recent call last):
  ...
redis.exceptions.ResponseError: wrong number of arguments for 'zadd' command
>>> 
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

1 participant