def auth_state_unavailable(auth_state_enabled):
    """auth_state enabled at the Authenticator level,

    but unavailable due to no crypto keys.
    """
    crypto.CryptKeeper.instance().keys = []
    yield
auth_state enabled at the Authenticator level,

but unavailable due to no crypto keys.
jupyterhub/tests/test_auth.py