def METHOD_NAME(self):
    self.assertEqual(
        html.escape('\'<script>"&foo;"</script>\''),
        '&#x27;&lt;script&gt;&quot;&amp;foo;&quot;&lt;/script&gt;&#x27;')
    self.assertEqual(
        html.escape('\'<script>"&foo;"</script>\'', False),
        '\'&lt;script&gt;"&amp;foo;"&lt;/script&gt;\'')