def test_encode_entities(self): # Assert HTML entity encoder (e.g., "&" => "&&") for a, b in ( ("É", "É"), ("&", "&"), ("<", "<"), (">", ">"), ('"', """), ("'", "'")): self.assertEqual(web.encode_entities(a), b) print "pattern.web.encode_entities()"