Ignore:
Timestamp:
13/01/07 15:26:26 (14 years ago)
Author:
pjkersha
Message:

python/ndg.security.test/ndg/security/test/AttAuthority/AttAuthorityClientTest.py: added config parser so that params can be set from a configuration file.

python/ndg.security.test/ndg/security/test/SessionMgr/SessionMgrClientTest.
py and python/ndg.security.test/ndg/security/test/SessionMgr/sessionMgrClientTest.cfg: added config parser + prompt for passwords where not set in config.

python/ndg.security.common/ndg/security/common/AttAuthority/init.py:
AA client code - added documentation and changed getAttCert so that an AttCert?
type can be passed in as well as a string for userAttCert arg.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/AttAuthority/AttAuthorityClientTest.py

    r1967 r1999  
    1515 
    1616import unittest 
    17 import os 
    18 import sys 
     17import os, sys, getpass 
     18from ConfigParser import SafeConfigParser 
    1919 
    2020from ndg.security.common.AttAuthority import AttAuthorityClient 
     
    2323     
    2424    def setUp(self): 
    25         # Session Manager WSDL 
    26         self.uri = 'http://127.0.0.1:5700/AttributeAuthority' 
     25         
     26        configParser = SafeConfigParser() 
     27        configParser.read("./attAuthorityClientTest.cfg") 
     28         
     29        self.cfg = {} 
     30        for section in configParser.sections(): 
     31            self.cfg[section] = dict(configParser.items(section)) 
    2732 
    2833        # Instantiate WS proxy 
    29         self.clnt = AttAuthorityClient(self.uri, tracefile=sys.stderr) 
     34        self.clnt = AttAuthorityClient(self.cfg['setUp']['uri'],  
     35                                       tracefile=sys.stderr) 
    3036    
    3137     
Note: See TracChangeset for help on using the changeset viewer.