Closed paulexconde closed 2 years ago
A workaround is to set the user to None
explicitly when setting up the test. For pytest
this works for me:
@pytest.fixture(autouse=True)
def unset_user():
from django_currentuser.middleware import _set_current_user
_set_current_user()
A workaround is to set the user to
None
explicitly when setting up the test. Forpytest
this works for me:@pytest.fixture(autouse=True) def unset_user(): from django_currentuser.middleware import _set_current_user _set_current_user()
@zvyn , Thanks 👍
I'm having the same problem