<s> from __future__ import unicode_literals <EOL> from django . test import SimpleTestCase <EOL> from localflavor . jp . forms import JPPostalCodeField , JPPrefectureCodeSelect , JPPrefectureSelect <EOL> class JPLocalFlavorTests ( SimpleTestCase ) : <EOL> def test_JPPrefectureSelect ( self ) : <EOL> f = JPPrefectureSelect ( ) <EOL> out = '''<STR_LIT>''' <EOL> self . assertHTMLEqual ( f . render ( '<STR_LIT>' , '<STR_LIT>' ) , out ) <EOL> def test_JPPrefectureCodeSelect ( self ) : <EOL> f = JPPrefectureCodeSelect ( ) <EOL> out = '''<STR_LIT>''' <EOL> self . assertHTMLEqual ( f . render ( '<STR_LIT>' , '<STR_LIT>' ) , out ) <EOL> def test_JPPostalCodeField ( self ) : <EOL> error_format = [ '<STR_LIT>' ] <EOL> valid = { <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> } <EOL> invalid = { <EOL> '<STR_LIT>' : error_format , <EOL> '<STR_LIT>' : error_format , <EOL> '<STR_LIT>' : error_format , <EOL> '<STR_LIT>' : error_format , <EOL> } <EOL> self . assertFieldOutput ( JPPostalCodeField , valid , invalid ) </s>
