How to test custom handler500?

Posted by Gr1N on Stack Overflow See other posts from Stack Overflow or by Gr1N
Published on 2012-10-06T21:34:36Z Indexed on 2012/10/06 21:37 UTC
Read the original article Hit count: 221

Filed under:
|

I write my handler for server errors and define it at root urls.py: handler500 = 'myhandler' And I want to write unittest for testing how it works. For testing I write view with error and define it in test URLs configuration, when I make request to this view in browser I see my handler and receive status code 500, but when I launch test that make request to this view I see stack trace and my test failed. Have you some ideas for testing handler500 by unittests?

© Stack Overflow or respective owner

Related posts about python

Related posts about django