Known subclasses: twisted.web.test.test_agent.AgentURIInjectionTests, twisted.web.test.test_agent.RequestURIInjectionTests, twisted.web.test.test_agent.RequestWriteToURIInjectionTests, twisted.web.test.test_webclient.DownloadPageURIInjectionTests, twisted.web.test.test_webclient.GetPageURIInjectionTests, twisted.web.test.test_webclient.HTTPClientFactorySetURLURIInjectionTests, twisted.web.test.test_webclient.HTTPClientFactoryURIInjectionTests, twisted.web.test.test_webclient.HTTPDownloaderSetURLURIInjectionTests, twisted.web.test.test_webclient.HTTPDownloaderURIInjectionTests, twisted.web.test.test_webclient.HTTPPageGetterURIInjectionTests

A mixin that runs HTTP URI injection tests. Define MethodInjectionTestsMixin.attemptRequestWithMaliciousURI in a twisted.trial.unittest.SynchronousTestCase subclass to test how HTTP client code behaves when presented with malicious HTTP URIs.

Method attemptRequestWithMaliciousURI Attempt to send a request with the given URI. This should synchronously raise a ValueError if either is invalid.
Method test_hostWithCRLFRejected Issuing a request with a URI whose host contains a carriage return and line feed fails with a ValueError.
Method test_hostWithWithUnprintableASCIIRejected Issuing a request with a URI whose host contains unprintable ASCII characters fails with a ValueError.
Method test_hostWithNonASCIIRejected Issuing a request with a URI whose host contains non-ASCII characters fails with a ValueError.
Method test_pathWithCRLFRejected Issuing a request with a URI whose path contains a carriage return and line feed fails with a ValueError.
Method test_pathWithWithUnprintableASCIIRejected Issuing a request with a URI whose path contains unprintable ASCII characters fails with a ValueError.
Method test_pathWithNonASCIIRejected Issuing a request with a URI whose path contains non-ASCII characters fails with a ValueError.
def test_hostWithCRLFRejected(self):

Issuing a request with a URI whose host contains a carriage return and line feed fails with a ValueError.

def test_hostWithWithUnprintableASCIIRejected(self):

Issuing a request with a URI whose host contains unprintable ASCII characters fails with a ValueError.

def test_hostWithNonASCIIRejected(self):

Issuing a request with a URI whose host contains non-ASCII characters fails with a ValueError.

def test_pathWithCRLFRejected(self):

Issuing a request with a URI whose path contains a carriage return and line feed fails with a ValueError.

def test_pathWithWithUnprintableASCIIRejected(self):

Issuing a request with a URI whose path contains unprintable ASCII characters fails with a ValueError.

def test_pathWithNonASCIIRejected(self):

Issuing a request with a URI whose path contains non-ASCII characters fails with a ValueError.

API Documentation for twisted, generated by pydoctor at 2020-03-25 17:34:30.