#11013: Better diagnostics information while testing
----------------------------------------+-----------------------------------
Reporter: gruszczy | Owner: nobody
Status: closed | Milestone:
Component: Testing framework | Version: 1.1-beta-1
Resolution: invalid | Keywords:
Stage: Unreviewed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
----------------------------------------+-----------------------------------
Changes (by rvdrijst):
* status: new => closed
* needs_better_patch: => 0
* resolution: => invalid
* needs_tests: => 0
* needs_docs: => 0
Comment:
I had the same problem but it turned out to be me, not django.
My problem was that I was using a custom '''`urls`''' attribute in the
testcase but I didn't specify a '''`handler404`''' and '''`handler500`'''
in addition to a '''`urlpatterns`'''. There are three solutions to this:
* specify '''`handler404`''' and '''`handler500`''' after the
'''`urlpatterns`''', referencing existing (dummy) views (see
[http://docs.djangoproject.com/en/dev/topics/http/views/#the-404-page-not-
found-view the docs]),
* import the default handlers by doing '''`from django.conf.urls.defaults
import *`''' (will require a 404.html and 500.html template, also see
[http://docs.djangoproject.com/en/dev/topics/http/views/#the-404-page-not-
found-view the docs]) ,
* set '''`DEBUG`''' to '''`True`''' during testing (which may require a
little hacking and is not recommended, see
[http://docs.djangoproject.com/en/dev/topics/testing/#other-test-
conditions these docs]).
I'm closing this ticket, assuming these suggestions do indeed solve your
problem, but feel free to reopen if your problem persists.
--
Ticket URL: <http://code.djangoproject.com/ticket/11013#comment:1>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" 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-updates?hl=en
-~----------~----~----~----~------~----~------~--~---