'Middleware should do nothing if the profile has no language field'

def test_without_language_field(self):

    userena_settings.USERENA_LANGUAGE_FIELD = 'non_existant_language_field'
    user = User.objects.get(pk=1)
    req = self._get_request_with_user(user)
    UserenaLocaleMiddleware().process_request(req)
    self.assertFalse(hasattr(req, 'LANGUAGE_CODE'))
