File tree Expand file tree Collapse file tree 1 file changed +19
-4
lines changed Expand file tree Collapse file tree 1 file changed +19
-4
lines changed Original file line number Diff line number Diff line change 7
7
from pathutils import full_path
8
8
from saml2 .attribute_converter import AttributeConverterNOOP
9
9
from saml2 .attribute_converter import to_local
10
+ from saml2 .saml import attribute_from_string
10
11
11
12
12
13
def _eq (l1 ,l2 ):
@@ -205,8 +206,22 @@ def test_noop_attribute_conversion():
205
206
assert attr .attribute_value [0 ].text == "Roland"
206
207
207
208
209
+ ava = """<?xml version='1.0' encoding='UTF-8'?>
210
+ <ns0:Attribute xmlns:ns0="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" FriendlyName="schacHomeOrganization" Name="urn:oid:1.3.6.1.4.1.25178.1.2.9" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"><ns0:AttributeValue xsi:nil="true" xsi:type="xs:string">uu.se</ns0:AttributeValue></ns0:Attribute>"""
211
+
212
+
213
+ def test_schac ():
214
+ attr = attribute_from_string (ava )
215
+ acs = attribute_converter .ac_factory ()
216
+ for ac in acs :
217
+ try :
218
+ res = ac .ava_from (attr )
219
+ except KeyError :
220
+ pass
221
+
222
+
208
223
if __name__ == "__main__" :
209
- t = TestAC ()
210
- t .setup_class ()
211
- t .test_mixed_attributes_1 ()
212
- #test_noop_attribute_conversion ()
224
+ # t = TestAC()
225
+ # t.setup_class()
226
+ # t.test_mixed_attributes_1()
227
+ test_schac ()
You can’t perform that action at this time.
0 commit comments