Hi all,
I am testing for Exceptions using unittest, for example:
self.assertRaises(UnrecognizedAirportError, func, arg1, arg2)
and my code raises:
raise UnrecognizedAirportError('From')
Which works well.
How do I test that the argument in the exception is what I expect it to be?
I wish to somehow assert that capturedException.argument == 'From'.
I hope this is clear enough - thanks in advance!
Tal.