class documentation
class AddAuthTests(SynchronousTestCase): (source)
Undocumented
Method | test |
add_auth() wraps the given agent with one that adds an ``Authorization: Basic ...`` HTTP header that contains the given credentials. |
Method | test |
Basic auth can be passed as `bytes`, allowing the user full control over the encoding. |
Method | test |
The Authorization header doesn't include linebreaks, even if the credentials are so long that Python's base64 implementation inserts them. |
Method | test |
Basic auth username and passwords given as `str` are encoded as UTF-8. |
Method | test |
add_auth() raises UnknownAuthConfig when given anything other than a tuple. |
add_auth() wraps the given agent with one that adds an ``Authorization: Basic ...`` HTTP header that contains the given credentials.
The Authorization header doesn't include linebreaks, even if the credentials are so long that Python's base64 implementation inserts them.
Basic auth username and passwords given as `str` are encoded as UTF-8. https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication#Character_encoding_of_HTTP_authentication