Allow adding users to specific groups

This commit is contained in:
GeorgianaElena
2019-06-20 21:54:51 +03:00
parent 55a5ac186e
commit da443ebd4b
4 changed files with 79 additions and 0 deletions

View File

@@ -130,6 +130,24 @@ def test_auth_dummy():
assert c.DummyAuthenticator.password == 'test'
def test_user_groups():
"""
Test setting user groups
"""
c = apply_mock_config({
'users': {
'groups': {
"g1": ["u1", "u2"],
"g1": ["u3", "u4"]
},
}
})
assert c.UserCreatingSpawner.user_groups == {
"g1": ["u1", "u2"],
"g1": ["u3", "u4"]
}
def test_auth_firstuse():
"""
Test setting FirstUse Authenticator options