Skip to content

isabella232/mockredis

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mock for the redis-py client library

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

Installation

Use pip:

pip install mockredispy

Usage

Both mockredis.mock_redis_client and mockredis.mock_strict_redis_cient 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)

Attribution

This code is shamelessly derived from work by John DeRosa.

About

mock for redis-py

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%