Skip to content

Commit a1a875f

Browse files
author
Roland Hedberg
committed
Added another test
1 parent 5ef7d82 commit a1a875f

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

tests/test_41_response.py

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
# -*- coding: utf-8 -*-
33

44
from contextlib import closing
5+
from saml2.attribute_converter import to_local
6+
from saml2.samlp import response_from_string
57

68
from saml2 import config
79
from saml2.authn_context import INTERNETPROTOCOLPASSWORD
@@ -112,7 +114,25 @@ def test_false_sign(self):
112114
else:
113115
assert False
114116

117+
def test_other_response(self):
118+
xml_response = open("attribute_response.xml").read()
119+
resp = response_factory(
120+
xml_response, self.conf,
121+
return_addrs=['https://myreviewroom.com/saml2/acs/'],
122+
outstanding_queries={'id-f4d370f3d03650f3ec0da694e2348bfe':
123+
"http://localhost:8088/sso"},
124+
timeslack=TIMESLACK, decode=False)
125+
126+
assert isinstance(resp, StatusResponse)
127+
assert isinstance(resp, AuthnResponse)
128+
resp.sec.only_use_keys_in_metadata=False
129+
resp.parse_assertion()
130+
si = resp.session_info()
131+
assert si
132+
print si["ava"]
133+
134+
115135
if __name__ == "__main__":
116136
t = TestResponse()
117137
t.setup_class()
118-
t.test_false_sign()
138+
t.test_other_response()

0 commit comments

Comments
 (0)