locationlabs / mockredis

mock for redis-py (NO LONGER SUPPORTED)
Apache License 2.0
227 stars 107 forks source link

mock_redis_client.from_url has incorrect signature #131

Open beamerblvd opened 7 years ago

beamerblvd commented 7 years ago

The signature of redis.Redis.from_url is as follows:

def from_url(cls, url, db=None, **kwargs)

However, Mockredispy defines it as follows:

def mock_redis_client(**kwargs):
    return MockRedis()

mock_redis_client.from_url = mock_redis_client

If redis.Redis.from_url is called with the valid arguments redis.Redis.from_url(url, **kwargs), it results in an error from Mockredispy about too many arguments passed to mock_redis_client.

beamerblvd commented 7 years ago

Submitted pull request #133.