tests: Use with stmt for assertRaises