'Test for html sanitization with bleach.'

def test_sanitize_html(self):

    allowed_tags = ['div', 'p', 'audio', 'pre', 'span']
    for tag in allowed_tags:
        queue_msg = '<{0}>Test    message</{0}>'.format(tag)
        self.assertEqual(sanitize_html(queue_msg), queue_msg)
    not_allowed_tag = 'script'
    queue_msg = '<{0}>Test    message</{0}>'.format(not_allowed_tag)
    expected = '&lt;script&gt;Test    message&lt;/script&gt;'
    self.assertEqual(sanitize_html(queue_msg), expected)
