def test_idempotent():
 dirty = u'<span>invalid & </span> < extra http://link.com<em>'
 clean = bleach.clean(dirty)
 eq_(clean, bleach.clean(clean))
 linked = bleach.linkify(dirty)
 eq_(linked, bleach.linkify(linked))

def test_idempotent ( ) : dirty = u'<span>invalid & </span> < extra http://link.com<em>' clean = bleach . clean ( dirty ) eq_ ( clean , bleach . clean ( clean ) ) linked = bleach . linkify ( dirty ) eq_ ( linked , bleach . linkify ( linked ) )
make sure that applying the filter twice doesnt change anything .