diff options
author | Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com> | 2013-04-02 17:07:54 +0200 |
---|---|---|
committer | Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com> | 2013-04-02 17:07:54 +0200 |
commit | 2ae12290b0cffe61e981f1ce94d5187f5d66aef8 (patch) | |
tree | c2b61e735f185c29f8f9474942654f1195279094 /tests/test_20_assertion.py | |
parent | ca6afd92fc6730ba17a78de6cb0cef808a8d6d18 (diff) | |
download | pysaml2-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_20_assertion.py')
-rw-r--r-- | tests/test_20_assertion.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/test_20_assertion.py b/tests/test_20_assertion.py index e6752652..d9763a38 100644 --- a/tests/test_20_assertion.py +++ b/tests/test_20_assertion.py @@ -18,6 +18,8 @@ from saml2 import saml import xmldsig import xmlenc +from pathutils import full_path + ONTS = [saml, mdui, mdattr, dri, ui, idpdisc, md, xmldsig, xmlenc] def _eq(l1,l2): @@ -283,7 +285,7 @@ def test_assertion_2(): }) ava = ava.apply_policy( "", policy ) - acs = ac_factory("attributemaps") + acs = ac_factory(full_path("attributemaps")) attribute=from_local(acs, ava, policy.get_name_form("")) assert len(attribute) == 4 @@ -418,7 +420,7 @@ def test_filter_values_req_opt_4(): name="urn:oid:2.5.4.12", name_format="urn:oasis:names:tc:SAML:2.0:attrname-format:uri")] - acs = attribute_converter.ac_factory("attributemaps") + acs = attribute_converter.ac_factory(full_path("attributemaps")) rava = attribute_converter.ava_fro(acs, r) oava = attribute_converter.ava_fro(acs, o) @@ -589,7 +591,7 @@ def test_filter_on_wire_representation_1(): name="urn:oid:2.5.4.12", name_format="urn:oasis:names:tc:SAML:2.0:attrname-format:uri")] - acs = attribute_converter.ac_factory("attributemaps") + acs = attribute_converter.ac_factory(full_path("attributemaps")) ava = { "sn":["Hedberg"], "givenname":["Roland"], "edupersonaffiliation":["staff"],"uid":["rohe0002"]} @@ -608,10 +610,10 @@ def test_filter_on_wire_representation_2(): name="urn:oid:2.5.4.12", name_format="urn:oasis:names:tc:SAML:2.0:attrname-format:uri")] - acs = attribute_converter.ac_factory("attributemaps") + acs = attribute_converter.ac_factory(full_path("attributemaps")) ava = { "sn":["Hedberg"], "givenname":["Roland"], "title":["Master"],"uid":["rohe0002"]} ava = assertion.filter_on_wire_representation(ava, acs, r, o) - assert _eq(ava.keys(), ["sn", "givenname", "title"])
\ No newline at end of file + assert _eq(ava.keys(), ["sn", "givenname", "title"]) |