fix bug 1071083 - use assertRaiseMessage more instead of manually handling exception in tests.

Also uses the fail testcase method for false positives in a few places.
Merge pull request #2795 from jezdez/bug1071083

fix bug 1071083 - use assertRaiseMessage more instead of manually handling exception in tests.