X-Git-Url: http://git.cascardo.eti.br/?a=blobdiff_plain;f=tests%2Ftestmapping.py;h=6daa636aadd34fa9bfc0d109e70cfc4bb87d3548;hb=HEAD;hp=1bc69ec7d365c3160d86a75deef7332c49e559be;hpb=1055b7bc810139d1e6ee3c225bcfba7b88e7aeab;p=cascardo%2Fipsilon.git diff --git a/tests/testmapping.py b/tests/testmapping.py index 1bc69ec..6daa636 100755 --- a/tests/testmapping.py +++ b/tests/testmapping.py @@ -1,5 +1,6 @@ #!/usr/bin/python -# Copyright (C) 2015 Ipsilon Project Contributors +# +# Copyright (C) 2015 Ipsilon project Contributors, for license see COPYING from helpers.common import IpsilonTestBase # pylint: disable=relative-import from helpers.http import HttpSessions # pylint: disable=relative-import @@ -15,6 +16,7 @@ from string import Template idp_g = {'TEMPLATES': '${TESTDIR}/templates/install', 'CONFDIR': '${TESTDIR}/etc', 'DATADIR': '${TESTDIR}/lib', + 'CACHEDIR': '${TESTDIR}/cache', 'HTTPDCONFD': '${TESTDIR}/${NAME}/conf.d', 'STATICDIR': '${ROOTDIR}', 'BINDIR': '${ROOTDIR}/ipsilon', @@ -28,7 +30,7 @@ idp_a = {'hostname': '${ADDRESS}:${PORT}', 'secure': 'no', 'testauth': 'yes', 'pam': 'no', - 'krb': 'no', + 'gssapi': 'no', 'ipa': 'no', 'server_debugging': 'True'} @@ -65,7 +67,7 @@ def check_info_plugin(s, idp_name, urlbase, expected): """ Logout, login, fetch SP page to get the info variables and compare the MELLON_ ones to what we expect. IDP and NAMEID are - ignored. The authtest plugin returns no groups. + ignored. """ # Log out @@ -84,7 +86,7 @@ def check_info_plugin(s, idp_name, urlbase, expected): data.pop('MELLON_IDP') data.pop('MELLON_NAME_ID') - for key in expected.keys(): + for key in expected: item = data.pop('MELLON_' + key) if item != expected[key]: raise ValueError('Expected %s, got %s' % (expected[key], item)) @@ -195,6 +197,7 @@ if __name__ == '__main__': 'surname': user, 'givenname': 'Test User', 'email': '%s@example.com' % user, + 'groups': user, } check_info_plugin(sess, idpname, spurl, expect) except Exception, e: # pylint: disable=broad-except @@ -221,6 +224,7 @@ if __name__ == '__main__': 'surname': user, 'givenname': 'Test User', 'email': '%s@example.com' % user, + 'groups': user } check_info_plugin(sess, idpname, spurl, expect) except Exception, e: # pylint: disable=broad-except