Ignore:
Timestamp:
10/10/08 15:46:20 (11 years ago)
Author:
pjkersha
Message:
  • Fixed ConfigFileParsers? and re-tested CredWallet? unit tests.
  • Added standard exception types for Session Manager AbstractAuthNService interface.
  • Integrated AbstractAuthNService and refactored CredWallet? back into SessionMgr?
  • SessionMgr? unit tests part re-factored. Attribute Cert retrieval tests still to update.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/python/ndg.security.test/ndg/security/test/sessionMgr/test_sessionMgr.py

    r4318 r4320  
    9292         
    9393                                   
    94     def test1Connect(self): 
     94    def test1Connect2AuthNServiceWithNoUserCertReturned(self): 
     95        """test1Connect: make a new session connecting to AuthN service where 
     96        no user cert. is returned""" 
     97         
     98        username = self.cfg.get('test1Connect', 'username') 
     99        if SessionMgrTestCase.test1Passphrase is None and \ 
     100           self.cfg.has_option('test1Connect', 'passphrase'): 
     101            SessionMgrTestCase.test1Passphrase = self.cfg.get('test1Connect',  
     102                                                              'passphrase') 
     103         
     104        if not SessionMgrTestCase.test1Passphrase: 
     105            SessionMgrTestCase.test1Passphrase = getpass.getpass( 
     106                prompt="\ntest1Connect pass-phrase for user %s: " % username) 
     107 
     108        print "Connecting to session manager as user: %s..." %username 
     109        userCert, userPriKey, issuingCert, sessID = self.sm.connect( 
     110                            username=username,  
     111                            passphrase=SessionMgrTestCase.test1Passphrase) 
     112        assert(userCert is None) 
     113        assert(userPriKey is None) 
     114        assert(issuingCert is None) 
     115         
     116        print "User '%s' connected to Session Manager:\n%s" % \ 
     117                                                        (username, self.sessID)        
     118                                   
     119    def test2Connect2AuthNServiceReturningAUserCert(self): 
    95120        """test1Connect: make a new session""" 
    96121         
Note: See TracChangeset for help on using the changeset viewer.