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/combinedservices/serverapp.py

    r4682 r4739  
    1414__revision__ = "$Id$" 
    1515import os 
     16from os.path import dirname, abspath, join 
    1617from authkit.permissions import UserIn 
    1718from authkit.authorize import authorize 
     
    166167    return CombinedServicesWSGI(app, globalConfig, **localConfig) 
    167168 
     169     
     170from ndg.security.test import BaseTestCase 
     171 
     172# Initialize environment for unit tests 
     173if BaseTestCase.configDirEnvVarName not in os.environ: 
     174    os.environ[BaseTestCase.configDirEnvVarName] = \ 
     175                            join(dirname(abspath(dirname(__file__))), 'config') 
     176 
    168177# Initialize environment for unit tests 
    169178if 'NDGSEC_COMBINED_SRVS_UNITTEST_DIR' not in os.environ: 
    170     os.environ['NDGSEC_COMBINED_SRVS_UNITTEST_DIR'] = \ 
    171                                     os.path.abspath(os.path.dirname(__file__)) 
     179    os.environ['NDGSEC_COMBINED_SRVS_UNITTEST_DIR']=abspath(dirname(__file__)) 
    172180     
    173181# To start the Site A Attribute Authority run  
     
    184192        port = 8000 
    185193         
    186     cfgFilePath = os.path.join(os.path.dirname(os.path.abspath(__file__)), 
    187                                'services.ini') 
     194    cfgFilePath = os.path.join(dirname(abspath(__file__)), 'services.ini') 
    188195         
    189196    from paste.httpserver import serve 
Note: See TracChangeset for help on using the changeset viewer.