make it work

This commit is contained in:
Roland Hedberg
2009-11-03 20:19:15 +01:00
parent 34dd7b21a1
commit 251bf6b206
2 changed files with 5 additions and 4 deletions

View File

@@ -42,7 +42,7 @@ FORM_SPEC = """<form method="post" action="%s">
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

View File

@@ -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 = """<?xml version='1.0' encoding='UTF-8'?>
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()