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/wssecurity/server/echoServer.py

    r4254 r4739  
    1717 
    1818from os.path import expandvars as xpdVars 
    19 from os.path import join as jnPath 
    20 mkPath = lambda file: jnPath(os.environ['NDGSEC_WSSESRV_UNITTEST_DIR'], file) 
     19from os.path import join, dirname, abspath 
     20mkPath = lambda file: join(os.environ['NDGSEC_WSSESRV_UNITTEST_DIR'], file) 
    2121 
    2222import logging 
    2323log = logging.getLogger(__name__) 
     24logging.basicConfig(level=logging.DEBUG, 
     25                    format='%(asctime)s %(filename)s:%(lineno)d ' 
     26                    '%(levelname)s %(message)s') 
     27 
     28 
     29from ndg.security.test import BaseTestCase 
     30 
     31# Initialize environment for unit tests 
     32if BaseTestCase.configDirEnvVarName not in os.environ: 
     33    os.environ[BaseTestCase.configDirEnvVarName] = \ 
     34                join(dirname(dirname(abspath(dirname(__file__)))), 'config') 
    2435 
    2536class EchoService(_EchoService): 
     
    2940        # Stop in debugger at beginning of SOAP stub if environment variable  
    3041        # is set 
    31         logging.basicConfig(level=logging.DEBUG, 
    32                             format='%(asctime)s %(filename)s:%(lineno)d ' 
    33                             '%(levelname)s %(message)s') 
    34  
    3542        self.__debug = bool(os.environ.get('NDGSEC_INT_DEBUG')) 
    3643        if self.__debug: 
Note: See TracChangeset for help on using the changeset viewer.