#NEWLINE# def test_USZipCodeField( self ) : #NEWLINE# #INDENT# error_format = [ 'Enter a zip code in the format XXXXX or XXXXX-XXXX.' ] #NEWLINE# valid = { #NEWLINE# #INDENT# '60606' : '60606' , #NEWLINE# 60606 : '60606' , #NEWLINE# '04000' : '04000' , #NEWLINE# ' 04000 ' : '04000' , #NEWLINE# '60606-1234' : '60606-1234' , #NEWLINE# #UNINDENT# } #NEWLINE# invalid = { #NEWLINE# #INDENT# '4000' : error_format , #NEWLINE# '6060-1234' : error_format , #NEWLINE# '60606-' : error_format , #NEWLINE# #UNINDENT# } #NEWLINE# self . assertFieldOutput ( forms . USZipCodeField , valid , invalid )