#NEWLINE# def test_getAssociation_expired( self ) : #NEWLINE# #INDENT# lifetime = 600 #NEWLINE# timestamp = ( int ( time . time ( ) ) - ( 2 * lifetime ) ) #NEWLINE# self . store . storeAssociation ( 'server-url' , OIDAssociation ( 'handle' , 'secret' , lifetime , lifetime , 'HMAC-SHA1' ) ) #NEWLINE# assoc = self . store . getAssociation ( 'server-url' , 'handle' ) #NEWLINE# self . assertEquals ( assoc , None ) #NEWLINE# self . assertRaises ( Association . DoesNotExist , Association . objects . get , server_url = 'server-url' , handle = 'handle' )