From 25af8fcdd8e3acc14b211c524b3dff2312ce3c3a Mon Sep 17 00:00:00 2001 From: Roland Hedberg Date: Sun, 16 Mar 2014 16:09:55 +0100 Subject: [PATCH] Better variable name assuming there will be more categories in the future. --- src/saml2/entity_category/incommon.py | 7 ++++--- tests/test_19_attribute_converter.py | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/saml2/entity_category/incommon.py b/src/saml2/entity_category/incommon.py index 2956ff2..e1c1462 100644 --- a/src/saml2/entity_category/incommon.py +++ b/src/saml2/entity_category/incommon.py @@ -1,10 +1,11 @@ __author__ = 'rolandh' -INC = "http://id.incommon.org/category/research-and-scholarship" +RESEARCH_AND_SCHOLARSHIP = "http://id.incommon.org/category/research-and-scholarship" RELEASE = { "": ["eduPersonTargetedID"], - INC: ["eduPersonPrincipalName", "eduPersonScopedAffiliation", "mail", - "givenName", "sn", "displayName"] + RESEARCH_AND_SCHOLARSHIP: ["eduPersonPrincipalName", + "eduPersonScopedAffiliation", "mail", + "givenName", "sn", "displayName"] } diff --git a/tests/test_19_attribute_converter.py b/tests/test_19_attribute_converter.py index 479f2f8..177d509 100644 --- a/tests/test_19_attribute_converter.py +++ b/tests/test_19_attribute_converter.py @@ -216,6 +216,7 @@ def test_schac(): for ac in acs: try: res = ac.ava_from(attr) + assert res[0] == "schacHomeOrganization" except KeyError: pass