Use test.TestingException where possible

Instead of calling 'raise Exception()' in a stub, use
tests.TestingException and only catch that exception.  This will make
sure the test have less false positives and hide other exceptions.

Change-Id: I384c93e220d570abec25dcbacead0aa3bc33cbcf
Partial-Bug: #1223605
Merge "Use test.TestingException where possible"