#NEWLINE# def testSharedCacheMatch( self ) : #NEWLINE# #INDENT# ns = mocks . MockNameServer ( mocks . GOOD_IP ) #NEWLINE# other_ns = mocks . MockNameServer ( mocks . PERFECT_IP ) #NEWLINE# ns . QueryWildcardCache ( save = True ) #NEWLINE# other_ns . QueryWildcardCache ( save = True ) #NEWLINE# other_ns . cache_check = ( other_ns . cache_check [ 0 ] , ( other_ns . cache_check [ 1 ] + 5 ) ) #NEWLINE# ( shared , slower , faster ) = ns . TestSharedCache ( other_ns ) #NEWLINE# self . assertEquals ( slower , True ) #NEWLINE# self . assertEquals ( slower . ip , mocks . GOOD_IP ) #NEWLINE# self . assertEquals ( faster . ip , mocks . PERFECT_IP ) #NEWLINE# other_ns . cache_check = ( other_ns . cache_check [ 0 ] , ( other_ns . cache_check [ 1 ] + 3600 ) ) #NEWLINE# ( shared , slower , faster ) = ns . TestSharedCache ( other_ns ) #NEWLINE# self . assertEquals ( shared , False ) #NEWLINE# self . assertEquals ( slower , None ) #NEWLINE# self . assertEquals ( faster , None )