jamesls/fakeredis

zadd with no member-score pairs should fail

jbaum-cmcrc opened this issue · 0 comments

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
>>>