Fix tests to correctly check for raised errors
2 files changed