#NEWLINE# def test_without_language_field( self ) : #NEWLINE# #INDENT# ' Middleware should do nothing if the profile has no language field ' #NEWLINE# userena_settings . USERENA_LANGUAGE_FIELD = 'non_existant_language_field' #NEWLINE# user = User . objects . get ( pk = 1 ) #NEWLINE# req = self . _get_request_with_user ( user ) #NEWLINE# UserenaLocaleMiddleware ( ) . process_request ( req ) #NEWLINE# self . failIf ( hasattr ( req , 'LANGUAGE_CODE' ) )