Skip to content

locationlabs/mockredis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

THIS REPO IS NO LONGER SUPPORTED. IF YOU ARE LOOKING FOR A SIMILAR SOLUTION, WE WOULD RECOMMEND LOOKING AT https://github.com/jamesls/fakeredis

Mock for the redis-py client library

Supports writing tests for code using the redis-py library without requiring a redis-server install.

Build Status

Installation

Use pip:

pip install mockredispy

Usage

Both mockredis.mock_redis_client and mockredis.mock_strict_redis_client can be used to patch instances of the redis client.

For example, using the mock library:

@patch('redis.Redis', mock_redis_client)

Or:

@patch('redis.StrictRedis', mock_strict_redis_client)

Testing

Many unit tests exist to verify correctness of mock functionality. In addition, most unit tests support testing against an actual redis-server instance to verify the tests against ground truth. See mockredis.tests.fixtures for more details and disclaimers.

Supported python versions

  • Python 2.7
  • Python 3.2
  • Python 3.3
  • Python 3.4
  • PyPy
  • PyPy3

Attribution

This code is shamelessly derived from work by John DeRosa.

About

mock for redis-py (NO LONGER SUPPORTED)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 41

Languages

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy