I add this to my settings:
-----------------------------------------------------------------------
TEMPLATE_CONTEXT_PROCESSORS = (
.....
'django.contrib.messages.context_processors.messages',
<----------------------------- new line
)
------------------------------------------------------------------------
I don't know the utility of this but now I only have 3 errors
---------------------------------------------------------------------------------------
======================================================================
ERROR: test_password_change_fails_with_invalid_old_password
(django.contrib.auth.tests.views.ChangePasswordTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/django/contrib/auth/
tests/views.py", line 147, in
test_password_change_fails_with_invalid_old_password
'new_password2': 'password1',
File "/usr/local/lib/python2.6/dist-packages/django/test/client.py",
line 322, in post
response = self.request(**r)
File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/
base.py", line 100, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python2.6/dist-packages/django/utils/
decorators.py", line 76, in _wrapped_view
response = view_func(request, *args, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/django/contrib/auth/
decorators.py", line 25, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/django/contrib/auth/
views.py", line 187, in password_change
}, context_instance=RequestContext(request))
File "/usr/local/lib/python2.6/dist-packages/django/shortcuts/
__init__.py", line 20, in render_to_response
return HttpResponse(loader.render_to_string(*args, **kwargs),
**httpresponse_kwargs)
File "/usr/local/lib/python2.6/dist-packages/django/template/
loader.py", line 181, in render_to_string
t = get_template(template_name)
File "/usr/local/lib/python2.6/dist-packages/django/template/
loader.py", line 157, in get_template
template, origin = find_template(template_name)
File "/usr/local/lib/python2.6/dist-packages/django/template/
loader.py", line 138, in find_template
raise TemplateDoesNotExist(name)
TemplateDoesNotExist: registration/password_change_form.html
======================================================================
ERROR: test_password_change_fails_with_mismatched_passwords
(django.contrib.auth.tests.views.ChangePasswordTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/django/contrib/auth/
tests/views.py", line 158, in
test_password_change_fails_with_mismatched_passwords
'new_password2': 'donuts',
File "/usr/local/lib/python2.6/dist-packages/django/test/client.py",
line 322, in post
response = self.request(**r)
File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/
base.py", line 100, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/usr/local/lib/python2.6/dist-packages/django/utils/
decorators.py", line 76, in _wrapped_view
response = view_func(request, *args, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/django/contrib/auth/
decorators.py", line 25, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/usr/local/lib/python2.6/dist-packages/django/contrib/auth/
views.py", line 187, in password_change
}, context_instance=RequestContext(request))
File "/usr/local/lib/python2.6/dist-packages/django/shortcuts/
__init__.py", line 20, in render_to_response
return HttpResponse(loader.render_to_string(*args, **kwargs),
**httpresponse_kwargs)
File "/usr/local/lib/python2.6/dist-packages/django/template/
loader.py", line 181, in render_to_string
t = get_template(template_name)
File "/usr/local/lib/python2.6/dist-packages/django/template/
loader.py", line 157, in get_template
template, origin = find_template(template_name)
File "/usr/local/lib/python2.6/dist-packages/django/template/
loader.py", line 138, in find_template
raise TemplateDoesNotExist(name)
TemplateDoesNotExist: registration/password_change_form.html
======================================================================
ERROR: Logout without next_page option renders the default template
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python2.6/dist-packages/django/contrib/auth/
tests/views.py", line 247, in test_logout_default
response = self.client.get('/logout/')
File "/usr/local/lib/python2.6/dist-packages/django/test/client.py",
line 290, in get
response = self.request(**r)
File "/usr/local/lib/python2.6/dist-packages/django/test/client.py",
line 230, in request
response = self.handler(environ)
File "/usr/local/lib/python2.6/dist-packages/django/test/client.py",
line 74, in __call__
response = self.get_response(request)
File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/
base.py", line 142, in get_response
return self.handle_uncaught_exception(request, resolver, exc_info)
File "/usr/local/lib/python2.6/dist-packages/django/core/handlers/
base.py", line 180, in handle_uncaught_exception
callback, param_dict = resolver.resolve500()
File "/usr/local/lib/python2.6/dist-packages/django/core/
urlresolvers.py", line 262, in resolve500
return self._resolve_special('500')
File "/usr/local/lib/python2.6/dist-packages/django/core/
urlresolvers.py", line 252, in _resolve_special
callback = getattr(self.urlconf_module, 'handler%s' % view_type)
AttributeError: 'module' object has no attribute 'handler500'
----------------------------------------------------------------------
Ran 154 tests in 25.638s
FAILED (errors=3)
---------------------------------------------------------------------
Apparently the problems are related with some missing templates I
don't use the django admin site. Can be related with that? Is an
obligation use that's missing templates?
In my site the passwords must to be changed by an administrator. The
user can't change his own password.
Are some way to do the test over a database already created? Because I
must to execute the query 'CREATE LANGUAGE plpgsql' before the use.
Thanks for read.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.