causes/mock_redis — pull request #74 by jcarbo (2013-11-17 04:57:56+00:00)
Title: Raise Errors For Empty Arrays as Arguments

Redis will unwrap arguments passed as arrays, so [] becomes
nothing, as if you didn't pass an argument. This means it will raise
"ERR wrong number of arguments for ':command'" errors when an empty
array is passed to something that accepts a variable number of
arguments (eg 'lpush'). Also, for lpushx and rpushx you can only pass
one value, so it will throw that same error if you try to pass an
array of multiple items.

I added handlers for the cases mentioned above, along with
corresponding tests. The commands I updated are: lpush, lpushx,
rpush, rpushx, sadd, zadd. I don't believe this is an exhaustive list
of commands where this error pops up, but these seem to be the most
common ones.