Commit ee69b04b authored by Valentin Samir's avatar Valentin Samir

Fix code style of previous commit

parent ff8373ee
......@@ -149,12 +149,14 @@ class XmlContent(object):
namespaces={'cas': "http://www.yale.edu/tp/cas"}
)
self.assertEqual(len(attributes), 1)
ignore_attrs = {"authenticationDate", "longTermAuthenticationRequestTokenUsed", "isFromNewLogin"}
ignore_attrs = {
"authenticationDate", "longTermAuthenticationRequestTokenUsed", "isFromNewLogin"
}
ignored_attrs = 0
attrs1 = set()
for attr in attributes[0]:
name = attr.tag[len("http://www.yale.edu/tp/cas")+2:]
if not name in ignore_attrs:
if name not in ignore_attrs:
attrs1.add((name, attr.text))
else:
ignored_attrs += 1
......@@ -164,7 +166,7 @@ class XmlContent(object):
attrs2 = set()
for attr in attributes:
name = attr.attrib['name']
if not name in ignore_attrs:
if name not in ignore_attrs:
attrs2.add((name, attr.attrib['value']))
original = set()
for key, value in original_attributes.items():
......
......@@ -1907,7 +1907,9 @@ class SamlValidateTestCase(TestCase, BaseServicePattern, XmlContent):
"//samla:AttributeStatement/samla:Attribute",
namespaces={'samla': "urn:oasis:names:tc:SAML:1.0:assertion"}
)
ignore_attrs = {"authenticationDate", "longTermAuthenticationRequestTokenUsed", "isFromNewLogin"} - set(original_attributes.keys())
ignore_attrs = {
"authenticationDate", "longTermAuthenticationRequestTokenUsed", "isFromNewLogin"
} - set(original_attributes.keys())
attrs = set()
for attr in attributes:
if not attr.attrib['AttributeName'] in ignore_attrs:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment