def test_pathWithCRLFRejected(self):
        """
        Issuing a request with a URI whose path contains a carriage
        return and line feed fails with a L{ValueError}.
        """
        with self.assertRaises(ValueError) as cm:
            uri = b"http://twisted.invalid/\r\npath"
            self.attemptRequestWithMaliciousURI(uri)
        self.assertRegex(str(cm.exception), "^Invalid URI")

        Issuing a request with a URI whose path contains a carriage
        return and line feed fails with a L{ValueError}.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/web/test/injectionhelpers.py