Known subclasses: twisted.web.test.test_httpauth.BasicAuthTests

TestCase mixin class which defines a number of tests for basic.BasicCredentialFactory. Because this mixin defines setUp, it must be inherited before TestCase.

Method setUp Undocumented
Method makeRequest Create a request object to be passed to basic.BasicCredentialFactory.decode along with a response value. Override this in a subclass.
Method test_interface BasicCredentialFactory implements ICredentialFactory.
Method test_usernamePassword basic.BasicCredentialFactory.decode turns a base64-encoded response into a UsernamePassword object with a password which reflects the one which was encoded in the response.
Method test_incorrectPadding basic.BasicCredentialFactory.decode decodes a base64-encoded response with incorrect padding.
Method test_invalidEncoding basic.BasicCredentialFactory.decode raises LoginFailed if passed a response which is not base64-encoded.
Method test_invalidCredentials basic.BasicCredentialFactory.decode raises LoginFailed when passed a response which is not valid base64-encoded text.
def setUp(self):
Undocumented
def makeRequest(self, method='GET', clientAddress=None):

Create a request object to be passed to basic.BasicCredentialFactory.decode along with a response value. Override this in a subclass.

def test_interface(self):
def test_usernamePassword(self):

basic.BasicCredentialFactory.decode turns a base64-encoded response into a UsernamePassword object with a password which reflects the one which was encoded in the response.

def test_incorrectPadding(self):

basic.BasicCredentialFactory.decode decodes a base64-encoded response with incorrect padding.

def test_invalidEncoding(self):

basic.BasicCredentialFactory.decode raises LoginFailed if passed a response which is not base64-encoded.

def test_invalidCredentials(self):

basic.BasicCredentialFactory.decode raises LoginFailed when passed a response which is not valid base64-encoded text.

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