From a1a875f0e8a140eb32c2799c891cd69cba957986 Mon Sep 17 00:00:00 2001 From: Roland Hedberg Date: Mon, 1 Dec 2014 22:00:24 +0100 Subject: [PATCH] Added another test --- tests/test_41_response.py | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/tests/test_41_response.py b/tests/test_41_response.py index d9ad37c..78e6917 100644 --- a/tests/test_41_response.py +++ b/tests/test_41_response.py @@ -2,6 +2,8 @@ # -*- coding: utf-8 -*- from contextlib import closing +from saml2.attribute_converter import to_local +from saml2.samlp import response_from_string from saml2 import config from saml2.authn_context import INTERNETPROTOCOLPASSWORD @@ -112,7 +114,25 @@ class TestResponse: else: assert False + def test_other_response(self): + xml_response = open("attribute_response.xml").read() + resp = response_factory( + xml_response, self.conf, + return_addrs=['https://myreviewroom.com/saml2/acs/'], + outstanding_queries={'id-f4d370f3d03650f3ec0da694e2348bfe': + "http://localhost:8088/sso"}, + timeslack=TIMESLACK, decode=False) + + assert isinstance(resp, StatusResponse) + assert isinstance(resp, AuthnResponse) + resp.sec.only_use_keys_in_metadata=False + resp.parse_assertion() + si = resp.session_info() + assert si + print si["ava"] + + if __name__ == "__main__": t = TestResponse() t.setup_class() - t.test_false_sign() + t.test_other_response()