diff options
Diffstat (limited to 'python/tests/errorchecking_tests.py')
-rw-r--r-- | python/tests/errorchecking_tests.py | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/python/tests/errorchecking_tests.py b/python/tests/errorchecking_tests.py index 3e4614df..65cdbbe8 100644 --- a/python/tests/errorchecking_tests.py +++ b/python/tests/errorchecking_tests.py @@ -24,6 +24,7 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +import os import unittest import sys @@ -35,6 +36,12 @@ if not '../.libs' in sys.path: import lasso +try: + dataDir +except NameError: + dataDir = '../../tests/data' + + class ErrorCheckingTestCase(unittest.TestCase): def test01(self): try: @@ -53,10 +60,10 @@ class ErrorCheckingTestCase(unittest.TestCase): # This time; we got something wrong as query string; we pass it to # init_from_authn_request_msg; surely it shouldn't segfault server = lasso.Server( - '../../tests/data/idp1-la/metadata.xml', - None, # '../../tests/data/idp1-la/public-key.pem' is no more used - '../../tests/data/idp1-la/private-key-raw.pem', - '../../tests/data/idp1-la/certificate.pem', + os.path.join(dataDir, 'idp1-la/metadata.xml'), + None, # os.path.join(dataDir, 'idp1-la/public-key.pem') is no more used + os.path.join(dataDir, 'idp1-la/private-key-raw.pem'), + os.path.join(dataDir, 'idp1-la/certificate.pem'), lasso.signatureMethodRsaSha1) login = lasso.Login(server) try: |