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

    Each time the fixture is used, a new group is created

    The group is deleted after the test
    """
    group = orm.Group(name=new_group_name())
    app.db.add(group)
    app.db.commit()
    yield group
Fixture for creating a temporary group

Each time the fixture is used, a new group is created

The group is deleted after the test
jupyterhub/tests/conftest.py