#NEWLINE# def test_can_preview_an_email( self ) : #NEWLINE# #INDENT# list_page = self . app . get ( reverse ( 'dashboard:comms-list' ) , user = self . staff ) #NEWLINE# update_page = list_page . click ( 'Edit' ) #NEWLINE# form = update_page . form #NEWLINE# form [ 'email_subject_template' ] = 'Hello {{ user.username }}' #NEWLINE# form [ 'email_body_template' ] = 'Hello {{ user.username }}' #NEWLINE# form [ 'email_body_html_template' ] = 'Hello {{ user.username }}' #NEWLINE# preview = form . submit ( 'show_preview' ) #NEWLINE# self . assertTrue ( ( 'Hello 1234' in preview . content . decode ( 'utf8' ) ) )