#NEWLINE# def testBasicAuthTwoDifferentCredentials( self ) : #NEWLINE# #INDENT# uri = urllib . parse . urljoin ( base , 'basic2/file.txt' ) #NEWLINE# ( response , content ) = self . http . request ( uri , 'GET' ) #NEWLINE# self . assertEqual ( response . status , 401 ) #NEWLINE# uri = urllib . parse . urljoin ( base , 'basic2/' ) #NEWLINE# ( response , content ) = self . http . request ( self , 'GET' ) #NEWLINE# self . assertEqual ( response . status , 401 ) #NEWLINE# self . http . add_credentials ( 'fred' , 'barney' ) #NEWLINE# ( response , content ) = self . http . request ( uri , 'GET' ) #NEWLINE# self . assertEqual ( response . status , 200 ) #NEWLINE# uri = urllib . parse . urljoin ( base , 'basic2/file.txt' ) #NEWLINE# ( response , content ) = self . http . request ( uri , 'GET' ) #NEWLINE# self . assertEqual ( response . status , 200 )