#NEWLINE# def test_ordered_items( self ) : #NEWLINE# #INDENT# email_headers = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# email_headers [ 'To' ] = 'you' #NEWLINE# email_headers [ 'From' ] = 'me' #NEWLINE# email_headers [ 'Date' ] = '2008/1/4' #NEWLINE# email_headers [ 'Subject' ] = 'X' #NEWLINE# email_headers [ 'Received' ] = '...' #NEWLINE# order = [ 'From' , 'To' , 'Subject' ] #NEWLINE# result = list ( ordered_items ( email_headers , order , False ) ) #NEWLINE# assert ( result == [ ( 'From' , 'me' ) , ( 'To' , 'you' ) , ( 'Subject' , 'X' ) ] )