#NEWLINE# def test_current_site_in_context_after_login( self ) : #NEWLINE# #INDENT# response = self . client . get ( reverse ( 'django.contrib.auth.views.login' ) ) #NEWLINE# self . assertEqual ( response . status_code , 200 ) #NEWLINE# if Site . _meta . installed : #NEWLINE# #INDENT# site = Site . objects . get_current ( ) #NEWLINE# self . assertEqual ( response . context [ 'site' ] , site ) #NEWLINE# self . assertEqual ( response . context [ 'site_name' ] , site . name ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . assertIsInstance ( response . context [ 'site' ] , RequestSite ) #NEWLINE# #UNINDENT# self . assertTrue ( isinstance ( response . context [ 'form' ] , AuthenticationForm ) , 'Login form is not an AuthenticationForm' )