class documentation

class BasicAuthTestsMixin: (source)

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

View In Hierarchy

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

Method makeRequest Create a request object to be passed to basic.BasicCredentialFactory.decode along with a response value. Override this in a subclass.
Method setUp Undocumented
Method test_incorrectPadding basic.BasicCredentialFactory.decode decodes a base64-encoded response with incorrect padding.
Method test_interface BasicCredentialFactory implements ICredentialFactory.
Method test_invalidCredentials basic.BasicCredentialFactory.decode raises LoginFailed when passed a response which is not valid base64-encoded text.
Method test_invalidEncoding basic.BasicCredentialFactory.decode raises LoginFailed if passed a response which is not base64-encoded.
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.
Instance Variable credentialFactory Undocumented
Instance Variable password Undocumented
Instance Variable realm Undocumented
Instance Variable request Undocumented
Instance Variable username Undocumented
def makeRequest(self, method=b'GET', clientAddress=None): (source)

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

def setUp(self): (source)

Undocumented

def test_incorrectPadding(self): (source)

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

def test_invalidCredentials(self): (source)

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

def test_invalidEncoding(self): (source)

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

def test_usernamePassword(self): (source)

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.

credentialFactory = (source)

Undocumented

Undocumented

Undocumented

Undocumented

Undocumented