tests: standardize to modern 'except FooError as err:' syntax
standardize to modern 'except FooError as err:' syntax (Part 2)
standardize to modern 'except FooError as err:' syntax (Part 3)
Merge pull request #4816 from hulu/except-as-tests

standardize to modern 'except FooError as err:' syntax in test files
Merge pull request #4817 from hulu/except-as-two

standardize to modern 'except FooError as err:' syntax (Part 2)
Merge pull request #4818 from hulu/except-as-three

standardize to modern 'except FooError as err:' syntax (Part 3)