def admin_access(app):
    """Grant admin-access with this fixture"""
    with mock.patch.dict(app.tornado_settings, {'admin_access': True}):
        yield
Grant admin-access with this fixture
jupyterhub/tests/conftest.py