def full_spawn(app):
    """Fixture enabling full instrumented server via InstrumentedSpawner"""
    with mock.patch.dict(
        app.tornado_settings, {'spawner_class': mocking.InstrumentedSpawner}
    ):
        yield
Fixture enabling full instrumented server via InstrumentedSpawner
jupyterhub/tests/conftest.py