#NEWLINE# def testDigestObject( self ) : #NEWLINE# #INDENT# credentials = ( 'joe' , 'password' ) #NEWLINE# host = None #NEWLINE# request_uri = '/projects/httplib2/test/digest/' #NEWLINE# headers = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# response = { #NEWLINE# #INDENT# 'www-authenticate' : 'Digest realm="myrealm", nonce="Ygk86AsKBAA=3516200d37f9a3230352fde99977bd6d472d4306", algorithm=MD5, qop="auth"' , #NEWLINE# #UNINDENT# } #NEWLINE# content = b'' #NEWLINE# d = httplib2 . DigestAuthentication ( credentials , host , request_uri , headers , response , content , None ) #NEWLINE# d . request ( 'GET' , request_uri , headers , content , cnonce = '33033375ec278a46' ) #NEWLINE# our_request = ( 'authorization: %s' % headers [ 'authorization' ] ) #NEWLINE# working_request = 'authorization: Digest username="joe", realm="myrealm", nonce="Ygk86AsKBAA=3516200d37f9a3230352fde99977bd6d472d4306", uri="/projects/httplib2/test/digest/", algorithm=MD5, response="97ed129401f7cdc60e5db58a80f3ea8b", qop=auth, nc=00000001, cnonce="33033375ec278a46"' #NEWLINE# self . assertEqual ( our_request , working_request )