Unittest in Django. How to get the exception message from assertRaises()?
Posted
by ziang
on Stack Overflow
See other posts from Stack Overflow
or by ziang
Published on 2010-04-22T15:57:03Z
Indexed on
2010/04/23
3:03 UTC
Read the original article
Hit count: 251
django
|unit-testing
I used the assertRaises() to validation there will be an exception thrown and there is no problem of this.
My question is, is there any way to get the exception message from assertRaises()? I would like to assert for different types of exceptiosn as well by parsing the exception message..
© Stack Overflow or respective owner