def test_locale_html_xss():
 testfield = Mock()
 testfield.locale = '<script>alert(1)</script>'
 s = helpers.locale_html(testfield)
 assert ('<script>' not in s)
 assert ('&lt;script&gt;alert(1)&lt;/script&gt;' in s)

def test_locale_html_xss ( ) : testfield = Mock ( ) testfield . locale = '<script>alert(1)</script>' s = helpers . locale_html ( testfield ) assert ( '<script>' not in s ) assert ( '&lt;script&gt;alert(1)&lt;/script&gt;' in s )
test for nastiness-removal in the transfields locale .