Karantir
unread,Mar 27, 2008, 10:42:53 AM3/27/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django users
Hi,
I use unittest framework and recently i've faced strange issue. I use
asserRaises() method to ensure that my model methods raises
appropriate exceptions. And methods raises, but asserRaises() doesn't
catch them, therefore i see an error with following traceback
<code>
======================================================================
ERROR: testCreate (logrus.documents.tests.testDocument)
----------------------------------------------------------------------
Traceback (most recent call last):
File "D:\webservers\home\django\logrus\..\logrus\documents
\tests.py", line 59, in testCreate
self.assertRaises(RevisionNotStarted,
self.documents[0].fix_revision())
File "D:\webservers\home\django\logrus\..\logrus\documents
\models.py", line 109, in fix_revision
raise RevisionNotStarted
RevisionNotStarted
</code>