adds unittest assertRaises

less code to check for an assertion test