#NEWLINE# def check_template( self , name , cx ) : #NEWLINE# #INDENT# template_file = '{0}.email' . format ( name ) #NEWLINE# expected_txt = get_template_contents ( '{0}.expected.txt' . format ( name ) ) #NEWLINE# expected_html = get_template_contents ( '{0}.expected.html' . format ( name ) ) #NEWLINE# rendered_default = render_email_to_string ( self , cx ) #NEWLINE# rendered_txt = render_email_to_string ( template_file , cx , alert_type = 'txt' ) #NEWLINE# rendered_html = render_email_to_string ( template_file , cx , alert_type = 'html' ) #NEWLINE# self . assertEqual ( rendered_default , rendered_txt ) #NEWLINE# self . assertEqual ( rendered_txt , expected_txt ) #NEWLINE# self . assertEqual ( rendered_html , expected_html )