#NEWLINE# def test_authentication_classes( self ) : #NEWLINE# #INDENT# @ api_view ( [ 'GET' ] ) #NEWLINE# @ authentication_classes ( [ BasicAuthentication ] ) #NEWLINE# def view( request ) : #NEWLINE# #INDENT# self . assertEqual ( len ( request . authenticators ) , 1 ) #NEWLINE# self . assertTrue ( isinstance ( request . authenticators [ 0 ] , BasicAuthentication ) ) #NEWLINE# return Response ( { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# request = self . factory . get ( '/' ) #NEWLINE# view ( view )