O
Olivier Langlois
Hi,
I have the following statement in my test :
self.assertRaises(CDKeyException, ValidationObject.Validate,
1001,'NonExistantKey')
and the test fails as if assertRaises was not catching the thrown
exception:
======================================================================
ERROR: test (DBLookupValidationTests.DBLookupValidationTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"C:\Dev\jade.r12sp\src\RVPackages\CDKey\Server\DBLookupValidationTests.py",
line 64, in test
self.assertRaises(CDKeyException, ValidationObject.Validate,
1001,'NonExistantKey')
File "C:\tools\Python\lib\unittest.py", line 320, in failUnlessRaises
callableObj(*args, **kwargs)
File
"C:\Dev\jade.r12sp\src/Services/local/Home\Scripts/system\CDKey\DBLookupValidation.py",
line 69, in Validate
raise CDKeyException, self.logger.error(e) CDKeyException
Any idea what is happening?
Thanks,
Olivier Langlois
http://www.olivierlanglois.net
I have the following statement in my test :
self.assertRaises(CDKeyException, ValidationObject.Validate,
1001,'NonExistantKey')
and the test fails as if assertRaises was not catching the thrown
exception:
======================================================================
ERROR: test (DBLookupValidationTests.DBLookupValidationTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"C:\Dev\jade.r12sp\src\RVPackages\CDKey\Server\DBLookupValidationTests.py",
line 64, in test
self.assertRaises(CDKeyException, ValidationObject.Validate,
1001,'NonExistantKey')
File "C:\tools\Python\lib\unittest.py", line 320, in failUnlessRaises
callableObj(*args, **kwargs)
File
"C:\Dev\jade.r12sp\src/Services/local/Home\Scripts/system\CDKey\DBLookupValidation.py",
line 69, in Validate
raise CDKeyException, self.logger.error(e) CDKeyException
Any idea what is happening?
Thanks,
Olivier Langlois
http://www.olivierlanglois.net