@pytest.fixture()
def admin_user(db):
 return User.objects.create_superuser(u'admin@example.com', u'password')

@ pytest . fixture ( ) def admin_user ( db ) : return User . objects . create_superuser ( u'admin@example.com' , u'password' )
a django admin user .