Ignore:
Timestamp:
05/01/09 14:43:08 (11 years ago)
Author:
pjkersha
Message:

Refactored x509, xmlsec, XMLSecDoc and combinedservices unit tests separating out test files into the config dir.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/xmlsec/etree/test_etree.py

    r4680 r4739  
    1212__contact__ = "Philip.Kershaw@stfc.ac.uk" 
    1313__revision__ = '$Id$' 
     14import logging 
     15logging.basicConfig(level=logging.DEBUG) 
     16log = logging.getLogger(__name__) 
    1417 
    1518import unittest 
     
    1821import getpass 
    1922import traceback 
    20 import logging 
    21 logging.basicConfig(level=logging.DEBUG) 
    22 log = logging.getLogger(__name__) 
    23  
    24 from ConfigParser import SafeConfigParser 
    25 from ndg.security.common.xmlsec.etree import XMLSecDoc 
    2623 
    2724from os.path import expandvars as xpdVars 
     
    2926mkPath=lambda file: jnPath(os.environ['NDGSEC_XMLSEC_ETREE_UNITTEST_DIR'],file) 
    3027 
    31 class XMLSecDocTestCase(unittest.TestCase): 
     28from ConfigParser import SafeConfigParser 
     29from ndg.security.test import BaseTestCase 
     30from ndg.security.common.xmlsec.etree import XMLSecDoc 
     31 
     32class XMLSecDocTestCase(BaseTestCase): 
    3233     
    3334    def setUp(self): 
     35        super(XMLSecDocTestCase, self).setUp() 
    3436         
    3537        if 'NDGSEC_INT_DEBUG' in os.environ: 
     
    8688                    xpdVars(self.cfg['test2SignWithInclC14N']['filepath']) 
    8789        self.xmlSecDoc.certFilePathList = \ 
    88                     xpdVars(self.cfg['test2SignWithInclC14N']['signingcertfilepath']) 
     90            xpdVars(self.cfg['test2SignWithInclC14N']['signingcertfilepath']) 
    8991        self.xmlSecDoc.signingKeyFilePath = \ 
    90                     xpdVars(self.cfg['test2SignWithInclC14N']['signingprikeyfilepath']) 
     92            xpdVars(self.cfg['test2SignWithInclC14N']['signingprikeyfilepath']) 
    9193 
    9294        keyPwd = self.cfg['test2SignWithInclC14N'].get('signingprikeypwd') 
     
    106108                    xpdVars(self.cfg['test3SignWithExclC14N']['filepath']) 
    107109        self.xmlSecDoc.certFilePathList = \ 
    108                     xpdVars(self.cfg['test3SignWithExclC14N']['signingcertfilepath']) 
     110            xpdVars(self.cfg['test3SignWithExclC14N']['signingcertfilepath']) 
    109111        self.xmlSecDoc.signingKeyFilePath = \ 
    110                     xpdVars(self.cfg['test3SignWithExclC14N']['keyfile']) 
     112            xpdVars(self.cfg['test3SignWithExclC14N']['signingprikeyfilepath']) 
    111113 
    112114        keyPwd = self.cfg['test3SignWithExclC14N'].get('signingprikeypwd') 
Note: See TracChangeset for help on using the changeset viewer.