Fix all misuses of assertRaises, and associated fallout
Some bits of tests were never executed, being after the exception has been raised in an assertRaises block. Fix all such instances
Test Plan
the unit tests pass
Migrated from D338 (view on Phabricator)