pipeline.py 468 B

12345678910111213141516
  1. from mockredis import MockRedis
  2. class MockRedisPipeline(MockRedis):
  3. """Imitate a redis-python pipeline object so unit tests can run on our Hudson
  4. CI server without needing a real Redis server."""
  5. def __init__(self, redis):
  6. """Initialize the object."""
  7. self.redis = redis
  8. def execute(self):
  9. """Emulate the execute method. All piped commands are executed immediately
  10. in this mock, so this is a no-op."""
  11. pass