Ignore:
Timestamp:
16/08/10 13:54:09 (10 years ago)
Author:
pjkersha
Message:

Incomplete - task 2: XACML-Security Integration

  • added unit tests for XACML Context handler
File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/NDGSecurity/python/ndg_security_test/ndg/security/test/unit/xacml/test_saml_pip.py

    r7314 r7327  
    3838    CONFIG_FILEPATH = path.join(THIS_DIR, CONFIG_FILENAME) 
    3939     
    40     NDGS_ATTR_ID = 'urn:ndg:security:attributes' 
     40    NDGS_ATTR_ID = BaseTestCase.ATTRIBUTE_NAMES[0] 
    4141    OPENID_ATTR_ID = 'urn:esg:openid' 
    42     OPENID = 'https://localhost:7443/pjkershaw' 
    4342     
    4443    CLNT_CERT_FILEPATH = path.join(BaseTestCase.PKI_DIR, 'localhost.crt') 
     
    8382                                                            openidAttr.dataType) 
    8483         
    85         openidAttrVal = anyUriAttrValue(self.__class__.OPENID) 
     84        openidAttrVal = anyUriAttrValue(self.__class__.OPENID_URI) 
    8685        openidAttr.attributeValues.append(openidAttrVal)  
    8786         
     
    115114        ctx = self._createXacmlRequestCtx() 
    116115         
    117         attributes = pip.attributeQuery(ctx, designator) 
    118         self.assert_(len(attributes) > 0) 
     116        attributeValues = pip.attributeQuery(ctx, designator) 
     117        self.assert_(len(attributeValues) > 0) 
     118        print("PIP retrieved attribute values %r" % attributeValues) 
    119119         
    120120    def test04InitFromConfigFile(self): 
     
    122122        pip = PIP.fromConfig(self.__class__.CONFIG_FILEPATH) 
    123123        self.assert_(pip.mappingFilePath) 
    124          
    125         for i in dir(PIP): 
    126             print("%s = %r" % (i, getattr(pip, i))) 
     124 
    127125         
    128126if __name__ == "__main__": 
Note: See TracChangeset for help on using the changeset viewer.