#NEWLINE# def testBasicAuth( self ) : #NEWLINE# #INDENT# uri = urllib . parse . urljoin ( base , 'basic/file.txt' ) #NEWLINE# ( response , content ) = self . http . request ( uri , 'GET' ) #NEWLINE# self . assertEqual ( response . status , 401 ) #NEWLINE# uri = urllib . parse . urljoin ( base , 'basic/' ) #NEWLINE# ( response , content ) = self . http . request ( uri , 'GET' ) #NEWLINE# self . assertEqual ( response . status , 401 ) #NEWLINE# self . http . add_credentials ( 'joe' , 'password' ) #NEWLINE# ( response , content ) = self . http . request ( uri , 'GET' ) #NEWLINE# self . assertEqual ( response . status , 200 ) #NEWLINE# uri = urllib . parse . urljoin ( base , 'basic/file.txt' ) #NEWLINE# ( response , content ) = self . http . request ( uri , 'GET' ) #NEWLINE# self . assertEqual ( response . status , 200 )