diff options
Diffstat (limited to 'django/contrib/auth/tests')
| -rw-r--r-- | django/contrib/auth/tests/test_views.py | 1 | ||||
| -rw-r--r-- | django/contrib/auth/tests/urls.py | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/django/contrib/auth/tests/test_views.py b/django/contrib/auth/tests/test_views.py index d1268862cf..e2c0d38152 100644 --- a/django/contrib/auth/tests/test_views.py +++ b/django/contrib/auth/tests/test_views.py @@ -711,6 +711,7 @@ class LogoutTest(AuthViewsTestCase): "%s should be allowed" % good_url) self.confirm_logged_out() + @skipIfCustomUser @override_settings( PASSWORD_HASHERS=('django.contrib.auth.hashers.SHA1PasswordHasher',), diff --git a/django/contrib/auth/tests/urls.py b/django/contrib/auth/tests/urls.py index c6349a57d1..da504b85fa 100644 --- a/django/contrib/auth/tests/urls.py +++ b/django/contrib/auth/tests/urls.py @@ -10,11 +10,13 @@ from django.shortcuts import render_to_response from django.template import Template, RequestContext from django.views.decorators.cache import never_cache + class CustomRequestAuthenticationForm(AuthenticationForm): def __init__(self, request, *args, **kwargs): assert isinstance(request, HttpRequest) super(CustomRequestAuthenticationForm, self).__init__(request, *args, **kwargs) + @never_cache def remote_user_auth_view(request): "Dummy view for remote user tests" @@ -22,6 +24,7 @@ def remote_user_auth_view(request): c = RequestContext(request, {}) return HttpResponse(t.render(c)) + def auth_processor_no_attr_access(request): render_to_response('context_processors/auth_attrs_no_access.html', RequestContext(request, {}, processors=[context_processors.auth])) @@ -29,32 +32,39 @@ def auth_processor_no_attr_access(request): return render_to_response('context_processors/auth_attrs_test_access.html', {'session_accessed': request.session.accessed}) + def auth_processor_attr_access(request): render_to_response('context_processors/auth_attrs_access.html', RequestContext(request, {}, processors=[context_processors.auth])) return render_to_response('context_processors/auth_attrs_test_access.html', {'session_accessed': request.session.accessed}) + def auth_processor_user(request): return render_to_response('context_processors/auth_attrs_user.html', RequestContext(request, {}, processors=[context_processors.auth])) + def auth_processor_perms(request): return render_to_response('context_processors/auth_attrs_perms.html', RequestContext(request, {}, processors=[context_processors.auth])) + def auth_processor_perm_in_perms(request): return render_to_response('context_processors/auth_attrs_perm_in_perms.html', RequestContext(request, {}, processors=[context_processors.auth])) + def auth_processor_messages(request): info(request, "Message 1") return render_to_response('context_processors/auth_attrs_messages.html', RequestContext(request, {}, processors=[context_processors.auth])) + def userpage(request): pass + def custom_request_auth_login(request): return login(request, authentication_form=CustomRequestAuthenticationForm) |
