'When an not-implemented method response is generated, an HTML message
will be displayed.  That message should include a quoted form of the
requested method, since that value come from a browser and shouldn\'t
necessarily be trusted.'

def test_notImplementedQuoting(self):

    req = self._getReq()
    req.requestReceived('<style>bad', '/gettableresource', 'HTTP/1.0')
    self.assertEqual(req.code, 501)
    renderedPage = req.transport.written.getvalue()
    self.assertNotIn('<style>bad', renderedPage)
    self.assertIn('&lt;style&gt;bad', renderedPage)
