def admin_user(app, username):
    """Fixture for creating a temporary admin user"""
    user = add_user(app.db, app, name=new_username('testadmin'), admin=True)
    yield user
Fixture for creating a temporary admin user
jupyterhub/tests/conftest.py