#NEWLINE# def layout_test_field_label_suffix( self , layout ) : #NEWLINE# #INDENT# class UserForm ( forms . Form ) : #NEWLINE# #INDENT# username = forms . CharField ( label_suffix = '!' ) #NEWLINE# no_suffix = forms . CharField ( label_suffix = '' ) #NEWLINE# password = forms . CharField ( ) #NEWLINE# #UNINDENT# form = UserForm ( ) #NEWLINE# rendered = render ( ( ( '{% form form using "floppyforms/layouts/' + layout ) + '.html" %}' ) , { #NEWLINE# #INDENT# 'form' : form , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertInHTML ( '<label for="id_username">Username!</label>' , rendered ) #NEWLINE# self . assertInHTML ( '<label for="id_no_suffix">No suffix</label>' , rendered ) #NEWLINE# self . assertInHTML ( '<label for="id_password">Password:</label>' , rendered ) #NEWLINE# form = UserForm ( label_suffix = '#' ) #NEWLINE# rendered = render ( ( ( '{% form form using "floppyforms/layouts/' + layout ) + '.html" %}' ) , { #NEWLINE# #INDENT# 'form' : form , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . assertInHTML ( '<label for="id_username">Username!</label>' , rendered ) #NEWLINE# self . assertInHTML ( '<label for="id_no_suffix">No suffix</label>' , rendered ) #NEWLINE# self . assertInHTML ( '<label for="id_password">Password#</label>' , rendered )