Re: assertRaises() in django unittest framework doesn't catch exceptions

2008-03-28 Thread Marty Alchin
On Thu, Mar 27, 2008 at 10:49 AM, Karantir <[EMAIL PROTECTED]> wrote: > > And here is a bit of my testcase > [code] > > self.assertRaises(RevisionNotStarted, > self.documents[0].fix_revision()) > [/code] Try removing the extra parentheses from your test case. assertRaises expects to get a

Re: assertRaises() in django unittest framework doesn't catch exceptions

2008-03-27 Thread Karantir
And here is a bit of my testcase [code] self.assertRaises(RevisionNotStarted, self.documents[0].fix_revision()) [/code] --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

assertRaises() in django unittest framework doesn't catch exceptions

2008-03-27 Thread Karantir
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