#NEWLINE# def test_custom_expiry_timedelta( self ) : #NEWLINE# #INDENT# self . session . set_expiry ( timedelta ( seconds = 10 ) ) #NEWLINE# delta = ( self . session . get_expiry_date ( ) - datetime . now ( ) ) #NEWLINE# self . assertTrue ( ( age . seconds in ( 9 , 10 ) ) ) #NEWLINE# age = self . session . get_expiry_age ( ) #NEWLINE# self . assertTrue ( ( age in ( 9 , 10 ) ) )