diff --git a/src/saml2/client.py b/src/saml2/client.py index 68e71b4..cf8d7c3 100644 --- a/src/saml2/client.py +++ b/src/saml2/client.py @@ -42,7 +42,7 @@ FORM_SPEC = """
LAX = True def verify_idp_conf(config_file): - config = eval(open(conf_file).read()) + config = eval(open(config_file).read()) # check for those that have to be there assert "xmlsec_binary" in config @@ -56,7 +56,7 @@ def verify_idp_conf(config_file): config["key_file"] = None if "metadata" in config: - md = MetaData() + md = metadata.MetaData() for mdfile in config["metadata"]: md.import_metadata(open(mdfile).read()) config["metadata"] = md diff --git a/tests/test_client.py b/tests/test_client.py index 2087ec6..7b6cb7f 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- from saml2.client import Saml2Client -from saml2 import samlp +from saml2 import samlp, client from saml2 import saml, utils XML_RESPONSE_FILE = "tests/saml_signed.xml" @@ -54,7 +54,8 @@ REQ1 = """ class TestClient: def setup_class(self): - self.client = Saml2Client({}, xmlsec_binary=XMLSEC_BINARY) + conf = client.verify_idp_conf("tests/server.config") + self.client = Saml2Client({},conf) def test_verify_1(self): xml_response = open(XML_RESPONSE_FILE).read()