You ran the tests and they are telling you what is wrong. Read the
test result!

  You have the django.contrib.auth app installed in your project. But
it seems that you haven't create the default templates needed for this
app works.

  For these tests work, you need to define some templates (read the
errors to see what templates are needed). For example:
   TemplateDoesNotExist: registration/password_change_form.html

  If you won't use the django.contrib.auth app in your project, remove
it from INSTALLED_APPS in settings.py.

  Renne Rocha
  http://about.me/rennerocha/


On Wed, Feb 23, 2011 at 6:20 PM, refreegrata <refreegr...@yahoo.com> wrote:
> Yeahh , I already try this. The number of errors decreases, but I
> still have some errors (15)
> -------------------------------------------------
> ======================================================================
> 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'
>
> ======================================================================
> ERROR: test_middleware_disabled_anon_user
> (django.contrib.messages.tests.cookie.CookieTest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>  File "/usr/local/lib/python2.6/dist-packages/django/contrib/messages/
> tests/base.py", line 247, in test_middleware_disabled_anon_user
>    'django.contrib.messages.context_processors.messages',
> ValueError: list.remove(x): x not in list
>
> ======================================================================
> ERROR: test_middleware_disabled_anon_user_fail_silently
> (django.contrib.messages.tests.cookie.CookieTest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>  File "/usr/local/lib/python2.6/dist-packages/django/contrib/messages/
> tests/base.py", line 276, in
> test_middleware_disabled_anon_user_fail_silently
>    'django.contrib.messages.context_processors.messages',
> ValueError: list.remove(x): x not in list
>
> ======================================================================
> ERROR: test_middleware_disabled_auth_user
> (django.contrib.messages.tests.cookie.CookieTest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>  File "/usr/local/lib/python2.6/dist-packages/django/contrib/messages/
> tests/base.py", line 213, in test_middleware_disabled_auth_user
>    'django.contrib.messages.context_processors.messages',
> ValueError: list.remove(x): x not in list
>
> ======================================================================
> ERROR: test_middleware_disabled_anon_user
> (django.contrib.messages.tests.fallback.FallbackTest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>  File "/usr/local/lib/python2.6/dist-packages/django/contrib/messages/
> tests/base.py", line 247, in test_middleware_disabled_anon_user
>    'django.contrib.messages.context_processors.messages',
> ValueError: list.remove(x): x not in list
>
> ======================================================================
> ERROR: test_middleware_disabled_anon_user_fail_silently
> (django.contrib.messages.tests.fallback.FallbackTest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>  File "/usr/local/lib/python2.6/dist-packages/django/contrib/messages/
> tests/base.py", line 276, in
> test_middleware_disabled_anon_user_fail_silently
>    'django.contrib.messages.context_processors.messages',
> ValueError: list.remove(x): x not in list
>
> ======================================================================
> ERROR: test_middleware_disabled_auth_user
> (django.contrib.messages.tests.fallback.FallbackTest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>  File "/usr/local/lib/python2.6/dist-packages/django/contrib/messages/
> tests/base.py", line 213, in test_middleware_disabled_auth_user
>    'django.contrib.messages.context_processors.messages',
> ValueError: list.remove(x): x not in list
>
> ======================================================================
> ERROR: test_middleware_disabled_anon_user
> (django.contrib.messages.tests.user_messages.LegacyFallbackTest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>  File "/usr/local/lib/python2.6/dist-packages/django/contrib/messages/
> tests/base.py", line 247, in test_middleware_disabled_anon_user
>    'django.contrib.messages.context_processors.messages',
> ValueError: list.remove(x): x not in list
>
> ======================================================================
> ERROR: test_middleware_disabled_anon_user_fail_silently
> (django.contrib.messages.tests.user_messages.LegacyFallbackTest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>  File "/usr/local/lib/python2.6/dist-packages/django/contrib/messages/
> tests/base.py", line 276, in
> test_middleware_disabled_anon_user_fail_silently
>    'django.contrib.messages.context_processors.messages',
> ValueError: list.remove(x): x not in list
>
> ======================================================================
> ERROR: test_middleware_disabled_auth_user
> (django.contrib.messages.tests.user_messages.LegacyFallbackTest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>  File "/usr/local/lib/python2.6/dist-packages/django/contrib/messages/
> tests/base.py", line 213, in test_middleware_disabled_auth_user
>    'django.contrib.messages.context_processors.messages',
> ValueError: list.remove(x): x not in list
>
> ======================================================================
> ERROR: test_middleware_disabled_anon_user
> (django.contrib.messages.tests.session.SessionTest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>  File "/usr/local/lib/python2.6/dist-packages/django/contrib/messages/
> tests/base.py", line 247, in test_middleware_disabled_anon_user
>    'django.contrib.messages.context_processors.messages',
> ValueError: list.remove(x): x not in list
>
> ======================================================================
> ERROR: test_middleware_disabled_anon_user_fail_silently
> (django.contrib.messages.tests.session.SessionTest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>  File "/usr/local/lib/python2.6/dist-packages/django/contrib/messages/
> tests/base.py", line 276, in
> test_middleware_disabled_anon_user_fail_silently
>    'django.contrib.messages.context_processors.messages',
> ValueError: list.remove(x): x not in list
>
> ======================================================================
> ERROR: test_middleware_disabled_auth_user
> (django.contrib.messages.tests.session.SessionTest)
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>  File "/usr/local/lib/python2.6/dist-packages/django/contrib/messages/
> tests/base.py", line 213, in test_middleware_disabled_auth_user
>    'django.contrib.messages.context_processors.messages',
> ValueError: list.remove(x): x not in list
>
> ----------------------------------------------------------------------
> Ran 154 tests in 18.915s
>
> FAILED (errors=15)
> -------------------------------------------------
> ----------------------------------------------------------------
> registration/password_change_form.html . Is an obligation build this
> template? because I dont use the "django.contrib.admin" to
> administrate the users (for some crazy permissions and validations I
> build my own admin site)
>
> and in my settings I have
>
> MIDDLEWARE_CLASSES = (
>    'django.middleware.common.CommonMiddleware',
>    'django.middleware.locale.LocaleMiddleware',
>
>    'django.contrib.sessions.middleware.SessionMiddleware',
>    'django.middleware.csrf.CsrfViewMiddleware',
>    'django.contrib.auth.middleware.AuthenticationMiddleware',
>    'django.contrib.messages.middleware.MessageMiddleware',
>    'django.middleware.csrf.CsrfResponseMiddleware',
>    # custom middleware
>    #
> 'libs.middleware.LoginRequiredMiddleware.LoginRequiredMiddleware',
>    #
> 'libs.middleware.ControlPermisoDepartamento.ControlPermisoDepartamento',
> )
>
> Something is missing or something is not necessary?
>
> 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 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.
>
>

-- 
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.

Reply via email to