summaryrefslogtreecommitdiffstats
path: root/python/tests/errorchecking_tests.py
diff options
context:
space:
mode:
authorEmmanuel Raviart <eraviart@entrouvert.com>2004-08-25 10:57:45 +0000
committerEmmanuel Raviart <eraviart@entrouvert.com>2004-08-25 10:57:45 +0000
commit09f7afd9909d9a6e5b6c0d148e2e8ba62648dc78 (patch)
tree77ba45693d6575698efeb2bd36d59daafefed0a6 /python/tests/errorchecking_tests.py
parent9d460cf67c3999a0ec7723c377a60df07268b5c8 (diff)
downloadlasso-09f7afd9909d9a6e5b6c0d148e2e8ba62648dc78.tar.gz
lasso-09f7afd9909d9a6e5b6c0d148e2e8ba62648dc78.tar.xz
lasso-09f7afd9909d9a6e5b6c0d148e2e8ba62648dc78.zip
Added a --source-dir option to tests.
Diffstat (limited to 'python/tests/errorchecking_tests.py')
-rw-r--r--python/tests/errorchecking_tests.py15
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: