Answer the question
In order to leave comments, you need to log in
Django + Pytest + Mock. How to write a test that checks the current Redis cache for a value?
Good time of the year.
I'm learning to write tests with mocks for Django (Python 3.6, for storing the Redis cache), so please don't kick too hard for a noob question. How can I write a test that mocks a function (which in turn is used to generate a key-value that is stored in the cache) checks the current cache for a value? If it matches, then the test passes.
I would be glad if you provide useful links to tutorial articles/videos about tests with mocks for complete dummies.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question