@pytest.fixture
def nobody():
 from django.contrib.auth import get_user_model
 return get_user_model().objects.get_nobody_user()

@ pytest . fixture def nobody ( ) : from django . contrib . auth import get_user_model return get_user_model ( ) . objects . get_nobody_user ( )
require the default anonymous user .