Questions tagged [fakeredis]

4 questions
2
votes
1 answer

No module named 'lupa' in fake redis

When I was using lock.release from fakeredis lib, I got below exception: File "/usr/local/lib/python3.6/site-packages/redis/lock.py", line 111, in acquire if self.do_acquire(token): File…
Phoenix
  • 3,996
  • 4
  • 29
  • 40
2
votes
1 answer

fakeredis between multiple django views

I have a test which involve multiple Django views It seems that the fakeredis isn't shared between multiple views I tried running the following code: import fakeredis from testfixtures import Replacer class TestWithFakeRedis(TestCase): def…
Nadav
  • 2,589
  • 9
  • 44
  • 63
1
vote
1 answer

Using fakeredis in a Django development settings file?

My Django settings.py file contains the following configuration options: # Caches CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.redis.RedisCache', 'LOCATION': 'redis://redis:6379', } } # Queues RQ_QUEUES =…
Scratcha
  • 1,359
  • 1
  • 14
  • 22
0
votes
0 answers

How to use fakeredis for Testing the redis caching of API?

I need to automate/test the Redis caching in our project. How can I test, can anyone share the idea for testing or any existing project that is testing redis cache in api. I am thinking to use fake-reddis to mock the redis in order to test api, but…