"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/Testing/testbrowser.py" between
Zope-5.1.1.tar.gz and Zope-5.1.2.tar.gz

About: Zope Z Object Publishing Environment - web application platform used for building content management systems, intranets, portals, and custom applications.

testbrowser.py  (Zope-5.1.1):testbrowser.py  (Zope-5.1.2)
skipping to change at line 73 skipping to change at line 73
wsgi_app = WSGITestApp(self) wsgi_app = WSGITestApp(self)
super().__init__(url=url, wsgi_app=wsgi_app) super().__init__(url=url, wsgi_app=wsgi_app)
def login(self, username, password): def login(self, username, password):
"""Set up a correct HTTP Basic Auth Authorization header""" """Set up a correct HTTP Basic Auth Authorization header"""
if not isinstance(username, bytes): if not isinstance(username, bytes):
username = username.encode('UTF-8') username = username.encode('UTF-8')
if not isinstance(password, bytes): if not isinstance(password, bytes):
password = password.encode('UTF-8') password = password.encode('UTF-8')
hdr = codecs.encode(b'%s:%s' % (username, password), 'base64') hdr = codecs.encode(b'%s:%s' % (username, password), 'base64')
self.addHeader('Authorization', 'basic {}'.format(hdr.decode('UTF-8'))) self.addHeader('Authorization', f'basic {hdr.decode("UTF-8")}')
 End of changes. 1 change blocks. 
0 lines changed or deleted 0 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)