def user(app):
    """Fixture for creating a temporary user

    Each time the fixture is used, a new user is created
    """
    user = add_user(app.db, app, name=new_username())
    yield user
Fixture for creating a temporary user

Each time the fixture is used, a new user is created
jupyterhub/tests/conftest.py