def test_refererQuote(self):
        """
        If the value of the I{Referer} header contains a quote, the quote is
        escaped.
        """
        self.site._logDateTime = "[%02d/%3s/%4d:%02d:%02d:%02d +0000]" % (
            25, 'Oct', 2004, 12, 31, 59)
        self.request.requestHeaders.addRawHeader(
            b'referer',
            b'http://malicious" ".website.invalid')
        self.assertLogs(
            b'"1.2.3.4" - - [25/Oct/2004:12:31:59 +0000] '
            b'"GET /dummy HTTP/1.0" 123 - '
            b'"http://malicious\\" \\".website.invalid" "-"\n')

        If the value of the I{Referer} header contains a quote, the quote is
        escaped.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/test_web.py