Since django-redis is in the version 4.9.0 the pattern to find with the command keys
is an object called CacheKey
. MockRedis
doesn't expect this object it's expecting an string and then crash.
With this line it's fixed: pattern = self._encode(pattern)
I'll do a pull requests with it