Merge pull request #382 from GeorgianaElena/issue349

Allow adding users to specific groups
This commit is contained in:
Min RK
2019-07-12 09:38:21 +02:00
committed by GitHub
5 changed files with 107 additions and 0 deletions

View File

@@ -129,6 +129,24 @@ def test_auth_dummy():
assert c.JupyterHub.authenticator_class == 'dummyauthenticator.DummyAuthenticator'
assert c.DummyAuthenticator.password == 'test'
from traitlets import Dict
def test_user_groups():
"""
Test setting user groups
"""
c = apply_mock_config({
'users': {
'extra_user_groups': {
"g1": ["u1", "u2"],
"g2": ["u3", "u4"]
},
}
})
assert c.UserCreatingSpawner.user_groups == {
"g1": ["u1", "u2"],
"g2": ["u3", "u4"]
}
def test_auth_firstuse():
"""