#NEWLINE# def test_no_html_in_messages( self ) : #NEWLINE# #INDENT# upload = FileUpload . objects . get ( name = 'invalid-id-20101206.xpi' ) #NEWLINE# resp = self . client . get ( reverse ( 'devhub.upload_detail' , args = [ upload . uuid , 'json' ] ) ) #NEWLINE# assert ( resp . status_code == 200 ) #NEWLINE# data = json . loads ( resp . content ) #NEWLINE# msg = data [ 'validation' ] [ 'messages' ] [ 1 ] #NEWLINE# assert ( msg [ 'message' ] == 'The value of &lt;em:id&gt; is invalid.' ) #NEWLINE# assert ( msg [ 'description' ] [ 0 ] == '&lt;iframe&gt;' ) #NEWLINE# assert ( msg [ 'signing_help' ] [ 0 ] == '&lt;script&gt;&amp;amp;' ) #NEWLINE# assert ( msg [ 'context' ] == [ '<em:description>...' , '<foo/>' ] )