Ignore:
Timestamp:
20/10/10 21:23:29 (10 years ago)
Author:
pjkersha
Message:

0.5.1 Release - fixes:

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI12-security/trunk/ndg_saml/ndg/saml/test/test_saml.py

    r7130 r7634  
    3939from xml.etree import ElementTree 
    4040 
     41from ndg.saml.utils import SAMLDateTime 
    4142from ndg.saml.saml2.core import (SAMLVersion, Attribute, AttributeStatement,  
    4243                                 AuthzDecisionStatement, Assertion,  
     
    742743                        ].decision == DecisionType.PERMIT)         
    743744         
     745    def test17SAMLDatetime(self): 
     746        # Test parsing of Datetimes following  
     747        # http://www.w3.org/TR/xmlschema-2/#dateTime  
     748         
     749        # No seconds fraction 
     750        self.assert_(SAMLDateTime.fromString('2010-10-20T14:49:50Z')) 
     751         
     752        self.assertRaises(TypeError, SAMLDateTime.fromString,  
     753                          None) 
     754         
     755         
    744756if __name__ == "__main__": 
    745757    unittest.main()         
Note: See TracChangeset for help on using the changeset viewer.