Mocked Redis counter does not increment between requests for different users
Summary The issue lies in the way Redis is being mocked using MagicMock. The mock_redis.get.return_value is set to b’1′ for the first user and then changed to b’2′ for the second user. However, this change does not reflect in the response because the mock_redis.incr.return_value is not updated accordingly. Root Cause The root cause of this … Read more