From e0fb5e3c99be71c80c5018442feda013910ef35c Mon Sep 17 00:00:00 2001 From: Roland Hedberg Date: Sun, 16 Mar 2014 15:38:25 +0100 Subject: [PATCH] Verify that the Schac OID are correct. --- tests/test_19_attribute_converter.py | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/tests/test_19_attribute_converter.py b/tests/test_19_attribute_converter.py index 70d7b9d..479f2f8 100644 --- a/tests/test_19_attribute_converter.py +++ b/tests/test_19_attribute_converter.py @@ -7,6 +7,7 @@ from attribute_statement_data import * from pathutils import full_path from saml2.attribute_converter import AttributeConverterNOOP from saml2.attribute_converter import to_local +from saml2.saml import attribute_from_string def _eq(l1,l2): @@ -205,8 +206,22 @@ def test_noop_attribute_conversion(): assert attr.attribute_value[0].text == "Roland" +ava = """ +uu.se""" + + +def test_schac(): + attr = attribute_from_string(ava) + acs = attribute_converter.ac_factory() + for ac in acs: + try: + res = ac.ava_from(attr) + except KeyError: + pass + + if __name__ == "__main__": - t = TestAC() - t.setup_class() - t.test_mixed_attributes_1() - #test_noop_attribute_conversion() + # t = TestAC() + # t.setup_class() + # t.test_mixed_attributes_1() + test_schac()