jamesls/fakeredis — pull request #4 by pindia (2012-06-03 08:31:27+00:00)
Title: Add FakeStrictRedis to match API of StrictRedis

The current `FakeRedis` class implements `redis-py`'s deprecated `Redis` interface instead of the new `StrictRedis` interface. I've restructured it to to have both `FakeRedis` and `FakeStrictRedis` classes that implement their respective interfaces. Just like in `redis-py`, `FakeStrictRedis` is the base class, and `FakeRedis` overrides just the few methods that differ.

I've restructured the unit tests similarly, with `TestFakeStrictRedis` and `TestFakeRedis` testing their respective interface, `TestFakeRedis` overriding the commands with a different API. I also added `TestRealStrictRedis`, which connects to a real Redis server using `StrictRedis` to test compatibility.