Catch correct exception type in unit test

Refs #10057
Merge branch 'bugfix/10057_indirecttrans_python_algorithm' into develop