Hello, when I run ``manage.py test`` to test my Django applications, then I also get a lot of test failures for django.contrib.auth. Most of them are TemplateDoesNotExist errors (complete log see below). This even happens in a virgin project:
1. Run ``django-admin startproject foo`` 2. Edit oen line in foo/settings.py: DATABASE_ENGINE = 'sqlite3' 3. Run ``python manage.py test`` Is that normal? What can I do to get rid of these errors? Luc T:\svnwork\lino\trunk\src\mysites\authtest>python manage.py test Creating test database... Creating table auth_permission Creating table auth_group Creating table auth_user Creating table auth_message Creating table django_content_type Creating table django_session Creating table django_site Installing index for auth.Permission model Installing index for auth.Message model EE..E...EEEEEEE.................. ====================================================================== ERROR: test_password_change_fails_with_invalid_old_password (django.contrib.auth.tests.views.ChangePasswordTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "l:\snapshot\django\django\contrib\auth\tests\views.py", line 156, in test_password_change_fails_with_invalid_old _password 'new_password2': 'password1', File "l:\snapshot\django\django\test\client.py", line 313, in post response = self.request(**r) File "l:\snapshot\django\django\core\handlers\base.py", line 92, in get_response response = callback(request, *callback_args, **callback_kwargs) File "l:\snapshot\django\django\contrib\auth\decorators.py", line 78, in __call__ return self.view_func(request, *args, **kwargs) File "l:\snapshot\django\django\contrib\auth\views.py", line 160, in password_change }, context_instance=RequestContext(request)) File "l:\snapshot\django\django\shortcuts\__init__.py", line 20, in render_to_response return HttpResponse(loader.render_to_string(*args, **kwargs), **httpresponse_kwargs) File "l:\snapshot\django\django\template\loader.py", line 103, in render_to_string t = get_template(template_name) File "l:\snapshot\django\django\template\loader.py", line 81, in get_template source, origin = find_template_source(template_name) File "l:\snapshot\django\django\template\loader.py", line 74, in find_template_source 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 "l:\snapshot\django\django\contrib\auth\tests\views.py", line 167, in test_password_change_fails_with_mismatched_ passwords 'new_password2': 'donuts', File "l:\snapshot\django\django\test\client.py", line 313, in post response = self.request(**r) File "l:\snapshot\django\django\core\handlers\base.py", line 92, in get_response response = callback(request, *callback_args, **callback_kwargs) File "l:\snapshot\django\django\contrib\auth\decorators.py", line 78, in __call__ return self.view_func(request, *args, **kwargs) File "l:\snapshot\django\django\contrib\auth\views.py", line 160, in password_change }, context_instance=RequestContext(request)) File "l:\snapshot\django\django\shortcuts\__init__.py", line 20, in render_to_response return HttpResponse(loader.render_to_string(*args, **kwargs), **httpresponse_kwargs) File "l:\snapshot\django\django\template\loader.py", line 103, in render_to_string t = get_template(template_name) File "l:\snapshot\django\django\template\loader.py", line 81, in get_template source, origin = find_template_source(template_name) File "l:\snapshot\django\django\template\loader.py", line 74, in find_template_source 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 "l:\snapshot\django\django\contrib\auth\tests\views.py", line 216, in test_logout_default response = self.client.get('/logout/') File "l:\snapshot\django\django\test\client.py", line 281, in get response = self.request(**r) File "l:\snapshot\django\django\test\client.py", line 225, in request response = self.handler(environ) File "l:\snapshot\django\django\test\client.py", line 69, in __call__ response = self.get_response(request) File "l:\snapshot\django\django\core\handlers\base.py", line 134, in get_response return self.handle_uncaught_exception(request, resolver, exc_info) File "l:\snapshot\django\django\core\handlers\base.py", line 165, in handle_uncaught_exception callback, param_dict = resolver.resolve500() File "l:\snapshot\django\django\core\urlresolvers.py", line 229, in resolve500 return self._resolve_special('500') File "l:\snapshot\django\django\core\urlresolvers.py", line 218, in _resolve_special callback = getattr(self.urlconf_module, 'handler%s' % view_type) AttributeError: 'module' object has no attribute 'handler500' ====================================================================== ERROR: test_confirm_complete (django.contrib.auth.tests.views.PasswordResetTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "l:\snapshot\django\django\contrib\auth\tests\views.py", line 107, in test_confirm_complete url, path = self._test_confirm_start() File "l:\snapshot\django\django\contrib\auth\tests\views.py", line 67, in _test_confirm_start response = self.client.post('/password_reset/', {'email': 'staffmem...@example.com'}) File "l:\snapshot\django\django\test\client.py", line 313, in post response = self.request(**r) File "l:\snapshot\django\django\core\handlers\base.py", line 92, in get_response response = callback(request, *callback_args, **callback_kwargs) File "l:\snapshot\django\django\contrib\auth\views.py", line 99, in password_reset form.save(**opts) File "l:\snapshot\django\django\contrib\auth\forms.py", line 125, in save t = loader.get_template(email_template_name) File "l:\snapshot\django\django\template\loader.py", line 81, in get_template source, origin = find_template_source(template_name) File "l:\snapshot\django\django\template\loader.py", line 74, in find_template_source raise TemplateDoesNotExist, name TemplateDoesNotExist: registration/password_reset_email.html ====================================================================== ERROR: test_confirm_different_passwords (django.contrib.auth.tests.views.PasswordResetTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "l:\snapshot\django\django\contrib\auth\tests\views.py", line 122, in test_confirm_different_passwords url, path = self._test_confirm_start() File "l:\snapshot\django\django\contrib\auth\tests\views.py", line 67, in _test_confirm_start response = self.client.post('/password_reset/', {'email': 'staffmem...@example.com'}) File "l:\snapshot\django\django\test\client.py", line 313, in post response = self.request(**r) File "l:\snapshot\django\django\core\handlers\base.py", line 92, in get_response response = callback(request, *callback_args, **callback_kwargs) File "l:\snapshot\django\django\contrib\auth\views.py", line 99, in password_reset form.save(**opts) File "l:\snapshot\django\django\contrib\auth\forms.py", line 125, in save t = loader.get_template(email_template_name) File "l:\snapshot\django\django\template\loader.py", line 81, in get_template source, origin = find_template_source(template_name) File "l:\snapshot\django\django\template\loader.py", line 74, in find_template_source raise TemplateDoesNotExist, name TemplateDoesNotExist: registration/password_reset_email.html ====================================================================== ERROR: test_confirm_invalid (django.contrib.auth.tests.views.PasswordResetTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "l:\snapshot\django\django\contrib\auth\tests\views.py", line 85, in test_confirm_invalid url, path = self._test_confirm_start() File "l:\snapshot\django\django\contrib\auth\tests\views.py", line 67, in _test_confirm_start response = self.client.post('/password_reset/', {'email': 'staffmem...@example.com'}) File "l:\snapshot\django\django\test\client.py", line 313, in post response = self.request(**r) File "l:\snapshot\django\django\core\handlers\base.py", line 92, in get_response response = callback(request, *callback_args, **callback_kwargs) File "l:\snapshot\django\django\contrib\auth\views.py", line 99, in password_reset form.save(**opts) File "l:\snapshot\django\django\contrib\auth\forms.py", line 125, in save t = loader.get_template(email_template_name) File "l:\snapshot\django\django\template\loader.py", line 81, in get_template source, origin = find_template_source(template_name) File "l:\snapshot\django\django\template\loader.py", line 74, in find_template_source raise TemplateDoesNotExist, name TemplateDoesNotExist: registration/password_reset_email.html ====================================================================== ERROR: test_confirm_invalid_post (django.contrib.auth.tests.views.PasswordResetTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "l:\snapshot\django\django\contrib\auth\tests\views.py", line 97, in test_confirm_invalid_post url, path = self._test_confirm_start() File "l:\snapshot\django\django\contrib\auth\tests\views.py", line 67, in _test_confirm_start response = self.client.post('/password_reset/', {'email': 'staffmem...@example.com'}) File "l:\snapshot\django\django\test\client.py", line 313, in post response = self.request(**r) File "l:\snapshot\django\django\core\handlers\base.py", line 92, in get_response response = callback(request, *callback_args, **callback_kwargs) File "l:\snapshot\django\django\contrib\auth\views.py", line 99, in password_reset form.save(**opts) File "l:\snapshot\django\django\contrib\auth\forms.py", line 125, in save t = loader.get_template(email_template_name) File "l:\snapshot\django\django\template\loader.py", line 81, in get_template source, origin = find_template_source(template_name) File "l:\snapshot\django\django\template\loader.py", line 74, in find_template_source raise TemplateDoesNotExist, name TemplateDoesNotExist: registration/password_reset_email.html ====================================================================== ERROR: test_confirm_valid (django.contrib.auth.tests.views.PasswordResetTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "l:\snapshot\django\django\contrib\auth\tests\views.py", line 78, in test_confirm_valid url, path = self._test_confirm_start() File "l:\snapshot\django\django\contrib\auth\tests\views.py", line 67, in _test_confirm_start response = self.client.post('/password_reset/', {'email': 'staffmem...@example.com'}) File "l:\snapshot\django\django\test\client.py", line 313, in post response = self.request(**r) File "l:\snapshot\django\django\core\handlers\base.py", line 92, in get_response response = callback(request, *callback_args, **callback_kwargs) File "l:\snapshot\django\django\contrib\auth\views.py", line 99, in password_reset form.save(**opts) File "l:\snapshot\django\django\contrib\auth\forms.py", line 125, in save t = loader.get_template(email_template_name) File "l:\snapshot\django\django\template\loader.py", line 81, in get_template source, origin = find_template_source(template_name) File "l:\snapshot\django\django\template\loader.py", line 74, in find_template_source raise TemplateDoesNotExist, name TemplateDoesNotExist: registration/password_reset_email.html ====================================================================== ERROR: Email is sent if a valid email address is provided for password reset ---------------------------------------------------------------------- Traceback (most recent call last): File "l:\snapshot\django\django\contrib\auth\tests\views.py", line 60, in test_email_found response = self.client.post('/password_reset/', {'email': 'staffmem...@example.com'}) File "l:\snapshot\django\django\test\client.py", line 313, in post response = self.request(**r) File "l:\snapshot\django\django\core\handlers\base.py", line 92, in get_response response = callback(request, *callback_args, **callback_kwargs) File "l:\snapshot\django\django\contrib\auth\views.py", line 99, in password_reset form.save(**opts) File "l:\snapshot\django\django\contrib\auth\forms.py", line 125, in save t = loader.get_template(email_template_name) File "l:\snapshot\django\django\template\loader.py", line 81, in get_template source, origin = find_template_source(template_name) File "l:\snapshot\django\django\template\loader.py", line 74, in find_template_source raise TemplateDoesNotExist, name TemplateDoesNotExist: registration/password_reset_email.html ====================================================================== ERROR: Error is raised if the provided email address isn't currently registered ---------------------------------------------------------------------- Traceback (most recent call last): File "l:\snapshot\django\django\contrib\auth\tests\views.py", line 52, in test_email_not_found response = self.client.get('/password_reset/') File "l:\snapshot\django\django\test\client.py", line 281, in get response = self.request(**r) File "l:\snapshot\django\django\core\handlers\base.py", line 92, in get_response response = callback(request, *callback_args, **callback_kwargs) File "l:\snapshot\django\django\contrib\auth\views.py", line 105, in password_reset }, context_instance=RequestContext(request)) File "l:\snapshot\django\django\shortcuts\__init__.py", line 20, in render_to_response return HttpResponse(loader.render_to_string(*args, **kwargs), **httpresponse_kwargs) File "l:\snapshot\django\django\template\loader.py", line 103, in render_to_string t = get_template(template_name) File "l:\snapshot\django\django\template\loader.py", line 81, in get_template source, origin = find_template_source(template_name) File "l:\snapshot\django\django\template\loader.py", line 74, in find_template_source raise TemplateDoesNotExist, name TemplateDoesNotExist: registration/password_reset_form.html ---------------------------------------------------------------------- Ran 33 tests in 1.531s FAILED (errors=10) Destroying test database... --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---