Check for __cause__
in Salt unit test when raising exceptions
#3086
Labels
complexity:medium
Something that requires one or few days to fix
kind:debt
Technical debt
priority:medium
Medium priority issues, should only be postponed if no other option
topic:tests
What's not tested may be broken
Component:
'salt', 'tests'
Why this is needed:
Since #3066 we start using
raise <exception> from <cause>
so in unit test currently we can only check the content of the last exception raised.What should be done:
It could be interesting to check as well the cause of the last exception
Implementation proposal (strongly recommended):
Create a new
assertRaisesSomething
function that basically do the exact same as theassertRaisesRegex
but also check the content of__cause__
of the exceptionThe text was updated successfully, but these errors were encountered: