diff --git a/jhub_apps/service/utils.py b/jhub_apps/service/utils.py index ca2ac2c4..f29ea425 100644 --- a/jhub_apps/service/utils.py +++ b/jhub_apps/service/utils.py @@ -47,7 +47,11 @@ def get_conda_envs(config): def get_fake_spawner_object(auth_state): fake_spawner = Mock() - fake_spawner.user.get_auth_state.return_value = auth_state + + async def get_auth_state(): + return auth_state + + fake_spawner.user.get_auth_state = get_auth_state fake_spawner.log = logger return fake_spawner