summaryrefslogtreecommitdiff
path: root/tests/test_69_discovery.py
diff options
context:
space:
mode:
authorLorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com>2013-04-02 17:07:54 +0200
committerLorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com>2013-04-02 17:07:54 +0200
commit2ae12290b0cffe61e981f1ce94d5187f5d66aef8 (patch)
treec2b61e735f185c29f8f9474942654f1195279094 /tests/test_69_discovery.py
parentca6afd92fc6730ba17a78de6cb0cef808a8d6d18 (diff)
downloadpysaml2-2ae12290b0cffe61e981f1ce94d5187f5d66aef8.tar.gz
Allow running the tests from the pysaml2 root directory.
This improves previous work for running the tests via the command "python setup.py test" from a fresh clone. This can be very useful to integrate pysaml2 in a continuous integration system such as Jenkins or Travis.
Diffstat (limited to 'tests/test_69_discovery.py')
-rw-r--r--tests/test_69_discovery.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/test_69_discovery.py b/tests/test_69_discovery.py
index bae7dda6..b8464486 100644
--- a/tests/test_69_discovery.py
+++ b/tests/test_69_discovery.py
@@ -7,26 +7,26 @@ def _eq(l1,l2):
return set(l1) == set(l2)
def test_verify():
- ds = DiscoveryServer(config_file="disco_conf")
+ ds = DiscoveryServer(config_file="tests.disco_conf")
assert ds
assert ds.verify_sp_in_metadata("urn:mace:example.com:saml:roland:sp")
def test_construct_0():
- sp = Saml2Client(config_file="servera_conf")
+ sp = Saml2Client(config_file="tests.servera_conf")
url = sp.create_discovery_service_request("http://example.com/saml/disco",
"https://example.com/saml/sp.xml")
assert url == "http://example.com/saml/disco?entityID=https%3A%2F%2Fexample.com%2Fsaml%2Fsp.xml"
def test_construct_1():
- sp = Saml2Client(config_file="servera_conf")
+ sp = Saml2Client(config_file="tests.servera_conf")
url = sp.create_discovery_service_request("http://example.com/saml/disco",
"https://example.com/saml/sp.xml")
assert url == "http://example.com/saml/disco?entityID=https%3A%2F%2Fexample.com%2Fsaml%2Fsp.xml"
def test_construct_deconstruct_request():
- sp = Saml2Client(config_file="servera_conf")
+ sp = Saml2Client(config_file="tests.servera_conf")
url = sp.create_discovery_service_request("http://example.com/saml/disco",
"https://example.com/saml/sp.xml",
is_passive=True,
@@ -35,20 +35,20 @@ def test_construct_deconstruct_request():
print url
- ds = DiscoveryServer(config_file="disco_conf")
+ ds = DiscoveryServer(config_file="tests.disco_conf")
dsr = ds.parse_discovery_service_request(url)
# policy is added by the parsing and verifying method
assert _eq(dsr.keys(),["return_url", "entityID", "returnIDParam",
"isPassive", "policy"])
def test_construct_deconstruct_response():
- sp = Saml2Client(config_file="servera_conf")
+ sp = Saml2Client(config_file="tests.servera_conf")
url = sp.create_discovery_service_request("http://example.com/saml/disco",
"https://example.com/saml/sp.xml",
is_passive=True,
returnIDParam="foo",
return_url="https://example.com/saml/sp/disc")
- ds = DiscoveryServer(config_file="disco_conf")
+ ds = DiscoveryServer(config_file="tests.disco_conf")
dsr = ds.parse_discovery_service_request(url)
args = dict([(key, dsr[key]) for key in ["returnIDParam", "return_url"]])
url = ds.create_discovery_service_response(
@@ -56,4 +56,4 @@ def test_construct_deconstruct_response():
**args)
idp_id = sp.parse_discovery_service_response(url, returnIDParam="foo")
- assert idp_id == "https://example.com/saml/idp.xml" \ No newline at end of file
+ assert idp_id == "https://example.com/saml/idp.xml"