Opened 15 years ago

Closed 15 years ago

#13669 closed (duplicate)

Django 1.2.1 test fails

Reported by: Alexandru Plugaru Owned by: nobody
Component: Testing framework Version: 1.2
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

$ python manage.py test

Creating test database 'default'...
Creating table auth_permission
Creating table auth_group_permissions
Creating table auth_group
Creating table auth_user_user_permissions
Creating table auth_user_groups
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.Group_permissions model
Installing index for auth.User_user_permissions model
Installing index for auth.User_groups model
Installing index for auth.Message model
No fixtures found.
.......EE...E.............................................................................................................................................
======================================================================
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-1.2.1-py2.6.egg/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-1.2.1-py2.6.egg/django/test/client.py", line 322, in post
    response = self.request(**r)
  File "/usr/local/lib/python2.6/dist-packages/Django-1.2.1-py2.6.egg/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-1.2.1-py2.6.egg/django/utils/decorators.py", line 76, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "/usr/local/lib/python2.6/dist-packages/Django-1.2.1-py2.6.egg/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-1.2.1-py2.6.egg/django/contrib/auth/views.py", line 187, in password_change
    }, context_instance=RequestContext(request))
  File "/usr/local/lib/python2.6/dist-packages/Django-1.2.1-py2.6.egg/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-1.2.1-py2.6.egg/django/template/loader.py", line 181, in render_to_string
    t = get_template(template_name)
  File "/usr/local/lib/python2.6/dist-packages/Django-1.2.1-py2.6.egg/django/template/loader.py", line 157, in get_template
    template, origin = find_template(template_name)
  File "/usr/local/lib/python2.6/dist-packages/Django-1.2.1-py2.6.egg/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-1.2.1-py2.6.egg/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-1.2.1-py2.6.egg/django/test/client.py", line 322, in post
    response = self.request(**r)
  File "/usr/local/lib/python2.6/dist-packages/Django-1.2.1-py2.6.egg/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-1.2.1-py2.6.egg/django/utils/decorators.py", line 76, in _wrapped_view
    response = view_func(request, *args, **kwargs)
  File "/usr/local/lib/python2.6/dist-packages/Django-1.2.1-py2.6.egg/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-1.2.1-py2.6.egg/django/contrib/auth/views.py", line 187, in password_change
    }, context_instance=RequestContext(request))
  File "/usr/local/lib/python2.6/dist-packages/Django-1.2.1-py2.6.egg/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-1.2.1-py2.6.egg/django/template/loader.py", line 181, in render_to_string
    t = get_template(template_name)
  File "/usr/local/lib/python2.6/dist-packages/Django-1.2.1-py2.6.egg/django/template/loader.py", line 157, in get_template
    template, origin = find_template(template_name)
  File "/usr/local/lib/python2.6/dist-packages/Django-1.2.1-py2.6.egg/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-1.2.1-py2.6.egg/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-1.2.1-py2.6.egg/django/test/client.py", line 290, in get
    response = self.request(**r)
  File "/usr/local/lib/python2.6/dist-packages/Django-1.2.1-py2.6.egg/django/test/client.py", line 230, in request
    response = self.handler(environ)
  File "/usr/local/lib/python2.6/dist-packages/Django-1.2.1-py2.6.egg/django/test/client.py", line 74, in __call__
    response = self.get_response(request)
  File "/usr/local/lib/python2.6/dist-packages/Django-1.2.1-py2.6.egg/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-1.2.1-py2.6.egg/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-1.2.1-py2.6.egg/django/core/urlresolvers.py", line 262, in resolve500
    return self._resolve_special('500')
  File "/usr/local/lib/python2.6/dist-packages/Django-1.2.1-py2.6.egg/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 1.516s

FAILED (errors=3)
Destroying test database 'default'...

See settings.py attached

Attachments (1)

settings.py (3.2 KB ) - added by Alexandru Plugaru 15 years ago.
settings.py

Download all attachments as: .zip

Change History (2)

by Alexandru Plugaru, 15 years ago

Attachment: settings.py added

settings.py

comment:1 by Russell Keith-Magee, 15 years ago

Resolution: duplicate
Status: newclosed

This appears to be a variation on a theme of #11077 -- that there is a difference between integration tests and application tests, but Django doesn't currently make that distinction.

Note: See TracTickets for help on using tickets.
Back to Top