add sample configuration that loads dummyauthenticator and simplespawner

This commit is contained in:
Min RK
2018-09-21 15:12:31 +02:00
parent c87fcd9b71
commit d34e84ae9d
2 changed files with 27 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
"""sample jupyterhub config file for testing
configures jupyterhub with dummyauthenticator and simplespawner
to enable testing without administrative privileges.
"""
c = get_config() # noqa
try:
from dummyauthenticator import DummyAuthenticator
except ImportError:
print("dummyauthenticator not available. Try: `pip install jupyterhub-dummyauthenticator`")
else:
c.JupyterHub.authenticator_class = DummyAuthenticator
try:
from simplespawner import SimpleLocalProcessSpawner
except ImportError:
print("simplespawner not available. Try: `pip install jupyterhub-simplespawner`")
else:
c.JupyterHub.spawner_class = SimpleLocalProcessSpawner