From 72500f9d0bfe306f1b08ccee5edf017ddc53da34 Mon Sep 17 00:00:00 2001 From: Roland Hedberg Date: Thu, 11 Mar 2010 10:15:54 +0100 Subject: [PATCH] Changed behavior, raise an exception instead of returning empty list matter of taste --- tests/test_3_metadata.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_3_metadata.py b/tests/test_3_metadata.py index afb215f..8e8dd1f 100644 --- a/tests/test_3_metadata.py +++ b/tests/test_3_metadata.py @@ -6,6 +6,7 @@ from saml2 import BINDING_SOAP from saml2 import md, saml, samlp from saml2 import time_util from saml2.saml import NAMEID_FORMAT_TRANSIENT +from py.test import raises SWAMI_METADATA = "swamid-kalmar-1.0.xml" INCOMMON_METADATA = "InCommon-metadata.xml" @@ -58,8 +59,7 @@ def test_incommon_1(): (id,ent["idp_sso"]) for id,ent in md.entity.items() if "idp_sso" in ent]) print idps.keys() assert len(idps) == 53 # !!!!???? < 10% - idp_sso = md.single_sign_on_services('urn:mace:incommon:uiuc.edu') - assert idp_sso == [] + raises(KeyError, "md.single_sign_on_services('urn:mace:incommon:uiuc.edu')") idp_sso = md.single_sign_on_services('urn:mace:incommon:alaska.edu') assert len(idp_sso) == 1 print idp_sso