Commit 0a4ed619 authored by lukas.burgey's avatar lukas.burgey

Add test for construct_from_userinfo

parent bf219661
Pipeline #109036 passed with stage
in 1 minute and 23 seconds
......@@ -222,3 +222,24 @@ def test_idp_deletion(deployed_deployment, idp, user, service, vo):
state.refresh_from_db()
assert state.is_pending
assert state.is_orphaned
def test_construct_from_userinfo(idp, userinfo):
test_value = 0
userinfo = {
'sub': 'foo',
'iss': idp.issuer_uri,
'test_value': test_value,
}
user = User.construct_from_userinfo(userinfo, idp)
assert user.userinfo['test_value'] == test_value
# change the test value and see if the userinfo actually gets changed
test_value = 1
userinfo = {
'sub': 'foo',
'iss': idp.issuer_uri,
'test_value': test_value,
}
user = User.construct_from_userinfo(userinfo, idp)
assert user.userinfo['test_value'] == test_value
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment