Ignore:
Timestamp:
05/01/09 10:25:57 (11 years ago)
Author:
pjkersha
Message:

Refactored Session Manager 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/sessionmanager/test_sessionmanager.py

    r4680 r4734  
    1414__contact__ = "Philip.Kershaw@stfc.ac.uk" 
    1515__revision__ = '$Id$' 
     16import logging 
     17logging.basicConfig(level=logging.DEBUG) 
    1618 
    1719import unittest 
    1820import os, sys, getpass, re 
    1921from ConfigParser import SafeConfigParser 
    20 import traceback 
     22 
     23from os.path import expandvars as xpdVars 
     24from os.path import join as jnPath 
     25mkPath = lambda file: jnPath(os.environ['NDGSEC_SM_UNITTEST_DIR'], file) 
     26 
     27from ndg.security.test import BaseTestCase 
    2128 
    2229from ndg.security.common.utils.configfileparsers import \ 
     
    2734from ndg.security.server.attributeauthority import AttributeAuthority 
    2835 
    29 from os.path import expandvars as xpdVars 
    30 from os.path import join as jnPath 
    31 mkPath = lambda file: jnPath(os.environ['NDGSEC_SM_UNITTEST_DIR'], file) 
    32  
    33 import logging 
    34 logging.basicConfig(level=logging.DEBUG) 
    35  
    36  
    37 class SessionManagerTestCase(unittest.TestCase): 
     36 
     37class SessionManagerTestCase(BaseTestCase): 
    3838    """Unit test case for ndg.security.server.sessionmanager.SessionManager  
    3939    class. 
     
    4545     
    4646    def setUp(self): 
     47        super(SessionManagerTestCase, self).setUp() 
    4748         
    4849        if 'NDGSEC_INT_DEBUG' in os.environ: 
     
    362363        section = 'test12GetAttCertFromLocalAAInstance' 
    363364        aaPropFilePath = self.cfg.get(section, 'aaPropFilePath') 
    364         attributeAuthority=AttributeAuthority(propFilePath=aaPropFilePath, 
    365                                               propPrefix='attributeAuthority') 
     365        attributeAuthority=AttributeAuthority(propFilePath=aaPropFilePath) 
    366366         
    367367        attCert = self.sm.getAttCert(sessID=self.sessID,  
Note: See TracChangeset for help on using the changeset viewer.