def test_html_rendered_properly():
 request = HttpRequest()
 setattr(request, '_messages', default_storage(request))
 info(request, 'Title', 'Body')
 messages = django_messages.get_messages(request)
 template = get_env().get_template('messages.html')
 html = template.render({'messages': messages})
 assert ('<h2>' in html)

def test_html_rendered_properly ( ) : request = HttpRequest ( ) setattr ( request , '_messages' , default_storage ( request ) ) info ( request , 'Title' , 'Body' ) messages = django_messages . get_messages ( request ) template = get_env ( ) . get_template ( 'messages.html' ) html = template . render ( { 'messages' : messages } ) assert ( '<h2>' in html )
html markup is properly displayed in final template .