#NEWLINE# def test_handles_unauthenticated_waterbutler_request( self ) : #NEWLINE# #INDENT# self . _prepare_mock_wb_response ( status_code = 401 ) #NEWLINE# url = '/{}nodes/{}/files/github/' . format ( API_BASE , self . project . _id ) #NEWLINE# res = self . app . get ( url , auth = self . user . auth , expect_errors = True ) #NEWLINE# assert_equal ( res . status_code , 403 ) #NEWLINE# assert_in ( 'detail' , res . json [ 'errors' ] [ 0 ] )