#NEWLINE# def test_choose_mx( self ) : #NEWLINE# #INDENT# records = [ ( 1 , 1 ) , ( 2 , 2 ) , ( 3 , 3 ) , ( 4 , 4 ) , ( 5 , 5 ) ] #NEWLINE# mx = MxSmtpRelay ( ) #NEWLINE# self . assertEqual ( 1 , mx . choose_mx ( records , 0 ) ) #NEWLINE# self . assertEqual ( 5 , mx . choose_mx ( records , 4 ) ) #NEWLINE# self . assertEqual ( 1 , mx . choose_mx ( records , 5 ) ) #NEWLINE# self . assertEqual ( 3 , mx . choose_mx ( records , 7 ) ) #NEWLINE# self . assertEqual ( 2 , mx . choose_mx ( records , 1821 ) )