Skip to content

Commit

Permalink
Replace mockredis with fakeredis
Browse files Browse the repository at this point in the history
  • Loading branch information
kleesc committed Jan 8, 2020
1 parent 67ebf00 commit a9f4f25
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions requirements.txt
Expand Up @@ -54,6 +54,7 @@ ecdsa==0.13.2
elasticsearch-dsl==7.0.0
elasticsearch==7.0.4
enum34==1.1.6
fakeredis==1.1.0
Flask-Cors==3.0.8
Flask-Login==0.4.1
Flask-Mail==0.9.1
Expand Down Expand Up @@ -93,8 +94,6 @@ MarkupSafe==1.1.1
maxminddb==1.4.1
meld3==2.0.0
mixpanel==4.5.0
mock==3.0.5
mockredispy==2.9.3
monotonic==1.5
moto==1.3.13
msgpack==0.6.1
Expand Down
4 changes: 2 additions & 2 deletions util/config/validators/test/test_validate_redis.py
Expand Up @@ -3,7 +3,7 @@

from mock import patch

from mockredis import mock_strict_redis_client
from fakeredis import FakeStrictRedis

from util.config.validator import ValidatorContext
from util.config.validators import ConfigValidationException
Expand All @@ -23,7 +23,7 @@
],
)
def test_validate_redis(unvalidated_config, user, user_password, use_mock, expected, app):
with patch("redis.StrictRedis" if use_mock else "redis.None", mock_strict_redis_client):
with patch("redis.StrictRedis" if use_mock else "redis.None", FakeStrictRedis):
validator = RedisValidator()
unvalidated_config = ValidatorContext(unvalidated_config)

Expand Down

0 comments on commit a9f4f25

Please sign in to comment.