0001-python3-handle-basic-authz-header-encoding-in-tests-.patch
tests/utils.py | ||
---|---|---|
55 | 55 | |
56 | 56 | |
57 | 57 |
def basic_authorization_header(user, password=None): |
58 |
cred = base64.b64encode('%s:%s' % (user.username, password or user.username)) |
|
59 |
return {'Authorization': 'Basic %s' % cred} |
|
58 |
cred = '%s:%s' % (user.username, password or user.username) |
|
59 |
b64cred = base64.b64encode(cred.encode('utf-8')).decode('ascii') |
|
60 |
return {'Authorization': 'Basic %s' % b64cred} |
|
61 | ||
60 | 62 | |
61 | 63 | |
62 | 64 |
def get_response_form(response, form='form'): |
63 |
- |