#NEWLINE# def testParseWWWAuthenticateBasic( self ) : #NEWLINE# #INDENT# res = httplib2 . _parse_www_authenticate ( { #NEWLINE# #INDENT# 'www-authenticate' : 'Basic realm="me"' , #NEWLINE# #UNINDENT# } ) #NEWLINE# basic = res [ 'basic' ] #NEWLINE# self . assertEqual ( 'me' , basic [ 'realm' ] ) #NEWLINE# res = httplib2 . _parse_www_authenticate ( { #NEWLINE# #INDENT# 'www-authenticate' : 'Basic realm="me", algorithm="MD5"' , #NEWLINE# #UNINDENT# } ) #NEWLINE# basic = res [ 'basic' ] #NEWLINE# self . assertEqual ( 'me' , basic [ 'realm' ] ) #NEWLINE# self . assertEqual ( 'MD5' , basic [ 'algorithm' ] ) #NEWLINE# res = httplib2 . _parse_www_authenticate ( { #NEWLINE# #INDENT# 'www-authenticate' : 'Basic realm="me", algorithm=MD5' , #NEWLINE# #UNINDENT# } ) #NEWLINE# basic = basic [ 'basic' ] #NEWLINE# self . assertEqual ( 'me' , basic [ 'realm' ] ) #NEWLINE# self . assertEqual ( 'MD5' , basic [ 'algorithm' ] )