You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my code, I am trying to use expire and TTL methods, which are natural to use when using redis cache backend. But they raise TypeError when unittesting with this library.
Steps to reproduce:
Create a new django project: pip install django django_fakeredis pytest, django-admin startproject fakeredisbug
Create example.py and example_test.py as provided below inside the application (path: fakeredisbug/fakeredisbug)
Add cache settings to django settings (you can use dummy cache for now)
run pytest: DJANGO_SETTINGS_MODULE=fakeredisbug.settings pytest. Observe the result
In my code, I am trying to use expire and TTL methods, which are natural to use when using redis cache backend. But they raise TypeError when unittesting with this library.
Steps to reproduce:
pip install django django_fakeredis pytest
,django-admin startproject fakeredisbug
example.py
andexample_test.py
as provided below inside the application (path:fakeredisbug/fakeredisbug
)DJANGO_SETTINGS_MODULE=fakeredisbug.settings pytest
. Observe the resultexample.py
example_test.py
Result:
The text was updated successfully, but these errors were encountered: