#NEWLINE# def test_PTPhoneNumberField( self ) : #NEWLINE# #INDENT# error_format = [ 'Phone numbers must have 9 digits, or start by + or 00.' ] #NEWLINE# valid = { #NEWLINE# #INDENT# '917845189' : '917845189' , #NEWLINE# '91 784 5189' : '917845189' , #NEWLINE# '91 784 5189' : '917845189' , #NEWLINE# '+351 91 111' : '+35191111' , #NEWLINE# '00351873' : '00351873' , #NEWLINE# #UNINDENT# } #NEWLINE# invalid = { #NEWLINE# #INDENT# '91 784 51 8' : error_format , #NEWLINE# '091 456 987 1' : error_format , #NEWLINE# #UNINDENT# } #NEWLINE# self . assertFieldOutput ( PTPhoneNumberField , valid , valid )