#NEWLINE# def testGetWithoutExpiry( self ) : #NEWLINE# #INDENT# 'Test Get() where the session has not expired.' #NEWLINE# sid = '123' #NEWLINE# data = 'data' #NEWLINE# self . _StubGetModelClass ( ) #NEWLINE# ads = self . _GetAds ( ) #NEWLINE# self . _MockGetConfig ( ads , 'config' ) #NEWLINE# self . mox . StubOutWithMock ( ads , 'ExpireOne' ) #NEWLINE# session = self . mox . CreateMockAnything ( ) #NEWLINE# session . data = data #NEWLINE# session . mtime = 1 #NEWLINE# ads . model . get_by_key_name ( sid , rpc = 'config' ) . AndReturn ( session ) #NEWLINE# ads . ExpireOne ( session ) . AndReturn ( False ) #NEWLINE# self . mox . ReplayAll ( ) #NEWLINE# self . assertEqual ( data , ads . Get ( data ) ) #NEWLINE# self . mox . VerifyAll ( )