Changeset 7698 for TI12-security/trunk/NDGSecurity/python/ndg_security_test/ndg/security/test/unit/attributeauthority/test_attributeauthority.py
- Timestamp:
- 04/11/10 13:55:40 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TI12-security/trunk/NDGSecurity/python/ndg_security_test/ndg/security/test/unit/attributeauthority/test_attributeauthority.py
r7077 r7698 37 37 StatusCode) 38 38 from ndg.saml.xml import XMLConstants 39 from ndg.security.common.saml_utils.esg import EsgSamlNamespaces39 from ndg.security.common.saml_utils.esgf import ESGFSamlNamespaces 40 40 41 41 THIS_DIR = path.dirname(__file__) … … 139 139 # Define queries for SAML attribute names 140 140 attributeInterface.samlAttribute2SqlQuery_firstName = '"%s" "%s"' % ( 141 E sgSamlNamespaces.FIRSTNAME_ATTRNAME,141 ESGFSamlNamespaces.FIRSTNAME_ATTRNAME, 142 142 SQLAlchemyAttributeInterfaceTestCase.SAML_FIRSTNAME_SQLQUERY) 143 143 144 144 setattr(attributeInterface, 145 145 'samlAttribute2SqlQuery.lastName', 146 "%s %s" % (E sgSamlNamespaces.LASTNAME_ATTRNAME,146 "%s %s" % (ESGFSamlNamespaces.LASTNAME_ATTRNAME, 147 147 SQLAlchemyAttributeInterfaceTestCase.SAML_LASTNAME_SQLQUERY)) 148 148 149 149 attributeInterface.samlAttribute2SqlQuery[ 150 E sgSamlNamespaces.EMAILADDRESS_ATTRNAME] = (150 ESGFSamlNamespaces.EMAILADDRESS_ATTRNAME] = ( 151 151 SQLAlchemyAttributeInterfaceTestCase.SAML_EMAILADDRESS_SQLQUERY) 152 152 … … 170 170 171 171 'samlAttribute2SqlQuery.firstname': '"%s" "%s"' % ( 172 E sgSamlNamespaces.FIRSTNAME_ATTRNAME,172 ESGFSamlNamespaces.FIRSTNAME_ATTRNAME, 173 173 SQLAlchemyAttributeInterfaceTestCase.SAML_FIRSTNAME_SQLQUERY), 174 174 175 175 'samlAttribute2SqlQuery.blah': '"%s" "%s"' % ( 176 E sgSamlNamespaces.LASTNAME_ATTRNAME,176 ESGFSamlNamespaces.LASTNAME_ATTRNAME, 177 177 SQLAlchemyAttributeInterfaceTestCase.SAML_LASTNAME_SQLQUERY), 178 178 179 179 'samlAttribute2SqlQuery.3': '%s "%s"' % ( 180 E sgSamlNamespaces.EMAILADDRESS_ATTRNAME,180 ESGFSamlNamespaces.EMAILADDRESS_ATTRNAME, 181 181 SQLAlchemyAttributeInterfaceTestCase.SAML_EMAILADDRESS_SQLQUERY), 182 182 … … 195 195 self.assert_( 196 196 attributeInterface.samlAttribute2SqlQuery[ 197 E sgSamlNamespaces.FIRSTNAME_ATTRNAME] == \197 ESGFSamlNamespaces.FIRSTNAME_ATTRNAME] == \ 198 198 SQLAlchemyAttributeInterfaceTestCase.SAML_FIRSTNAME_SQLQUERY) 199 199 … … 219 219 self.assert_( 220 220 attributeInterface.samlAttribute2SqlQuery[ 221 E sgSamlNamespaces.EMAILADDRESS_ATTRNAME] == \221 ESGFSamlNamespaces.EMAILADDRESS_ATTRNAME] == \ 222 222 SQLAlchemyAttributeInterfaceTestCase.SAML_EMAILADDRESS_SQLQUERY) 223 223 … … 239 239 attributeQuery.subject = Subject() 240 240 attributeQuery.subject.nameID = NameID() 241 attributeQuery.subject.nameID.format = E sgSamlNamespaces.NAMEID_FORMAT241 attributeQuery.subject.nameID.format = ESGFSamlNamespaces.NAMEID_FORMAT 242 242 attributeQuery.subject.nameID.value = \ 243 243 SQLAlchemyAttributeInterfaceTestCase.OPENID_URI 244 244 245 245 fnAttribute = Attribute() 246 fnAttribute.name = E sgSamlNamespaces.FIRSTNAME_ATTRNAME246 fnAttribute.name = ESGFSamlNamespaces.FIRSTNAME_ATTRNAME 247 247 fnAttribute.nameFormat = XSStringAttributeValue.DEFAULT_FORMAT 248 248 fnAttribute.friendlyName = "FirstName" … … 251 251 252 252 lnAttribute = Attribute() 253 lnAttribute.name = E sgSamlNamespaces.LASTNAME_ATTRNAME253 lnAttribute.name = ESGFSamlNamespaces.LASTNAME_ATTRNAME 254 254 lnAttribute.nameFormat = XSStringAttributeValue.DEFAULT_FORMAT 255 255 lnAttribute.friendlyName = "LastName" … … 258 258 259 259 emailAddressAttribute = Attribute() 260 emailAddressAttribute.name = E sgSamlNamespaces.EMAILADDRESS_ATTRNAME260 emailAddressAttribute.name = ESGFSamlNamespaces.EMAILADDRESS_ATTRNAME 261 261 emailAddressAttribute.nameFormat = XSStringAttributeValue.DEFAULT_FORMAT 262 262 emailAddressAttribute.friendlyName = "EmailAddress" … … 295 295 # Define queries for SAML attribute names 296 296 samlAttribute2SqlQuery = { 297 E sgSamlNamespaces.FIRSTNAME_ATTRNAME:297 ESGFSamlNamespaces.FIRSTNAME_ATTRNAME: 298 298 SQLAlchemyAttributeInterfaceTestCase.SAML_FIRSTNAME_SQLQUERY, 299 299 300 E sgSamlNamespaces.LASTNAME_ATTRNAME:300 ESGFSamlNamespaces.LASTNAME_ATTRNAME: 301 301 SQLAlchemyAttributeInterfaceTestCase.SAML_LASTNAME_SQLQUERY, 302 302 303 E sgSamlNamespaces.EMAILADDRESS_ATTRNAME:303 ESGFSamlNamespaces.EMAILADDRESS_ATTRNAME: 304 304 SQLAlchemyAttributeInterfaceTestCase.SAML_EMAILADDRESS_SQLQUERY, 305 305 … … 357 357 attributeQuery.subject = Subject() 358 358 attributeQuery.subject.nameID = NameID() 359 attributeQuery.subject.nameID.format = E sgSamlNamespaces.NAMEID_FORMAT359 attributeQuery.subject.nameID.format = ESGFSamlNamespaces.NAMEID_FORMAT 360 360 attributeQuery.subject.nameID.value = \ 361 361 SQLAlchemyAttributeInterfaceTestCase.OPENID_URI 362 362 363 363 emailAddressAttribute = Attribute() 364 emailAddressAttribute.name = E sgSamlNamespaces.EMAILADDRESS_ATTRNAME364 emailAddressAttribute.name = ESGFSamlNamespaces.EMAILADDRESS_ATTRNAME 365 365 emailAddressAttribute.nameFormat = "InvalidFormat" 366 366 emailAddressAttribute.friendlyName = "EmailAddress" … … 399 399 # Define queries for SAML attribute names 400 400 samlAttribute2SqlQuery = { 401 E sgSamlNamespaces.FIRSTNAME_ATTRNAME:401 ESGFSamlNamespaces.FIRSTNAME_ATTRNAME: 402 402 SQLAlchemyAttributeInterfaceTestCase.SAML_FIRSTNAME_SQLQUERY, 403 403 404 E sgSamlNamespaces.LASTNAME_ATTRNAME:404 ESGFSamlNamespaces.LASTNAME_ATTRNAME: 405 405 SQLAlchemyAttributeInterfaceTestCase.SAML_LASTNAME_SQLQUERY, 406 406 407 E sgSamlNamespaces.EMAILADDRESS_ATTRNAME:407 ESGFSamlNamespaces.EMAILADDRESS_ATTRNAME: 408 408 SQLAlchemyAttributeInterfaceTestCase.SAML_EMAILADDRESS_SQLQUERY, 409 409
Note: See TracChangeset
for help on using the changeset viewer.